Gambit: Software Tools for Game Theory | ||
---|---|---|
<<< Previous | The Gambit Command Language | Next >>> |
The functions Help and Manual are used to obtain online documentation of any function in the GCL, including user defined functions that you created with the NewFunction command.
If the Help function is called with a string that is an exact match for a GCL function name, then it returns a list of function prototypes for that function name (there can be more than one prototype for a function name since GCL functions can be overloaded.) For example,
GCL1:= << Help["help"] { Help[x->TEXT, {udf->True}, {bif->True}] =: LIST(TEXT) } |
The required text parameter for Help can also contain the regular-expression style wildcards * and ?. In this case, if there is not an exact match, a list of function names matching \verb+x+ is returned. For example, The command
GCL1:= << Help["*efg"] { CompressEfg, LoadEfg, NewEfg, SaveEfg } |
Note that the function Help is listable (see section on listability), so that we can do \verb+Help[Help["*efg"]]+ to get a list of function prototypes for all functions whose names end with \verb+efg+. Similarly, \verb+Help["*"]+ gives a list of all function names in the GCL, and {\tt Help[Help["*"]]} gives a list of all function prototypes in the GCL.
The function Manual is used to obtain a more complete description of a GCL function. If Manual is called with an argument that is an exact match for a GCL function name, it returns the manual entry for that function. For a built-in function a textual description of the function and its parameters is returned.
<<< Previous | Home | Next >>> |
Listability of functions | Up | Advanced topics |