DefaultDirectory
,
DllDirectory
,
PrettyPrinter, GetPrettyPrinter
,
MaxEvalDepth
,
Help
,
HistorySize
.
Startup configuration
Yacas allows you to configure a few things at startup. The file
~/.yacasrc is written in the Yacas language and
will be executed when Yacas is run. The
following functions can be useful in the ~/.yacasrc file.
DefaultDirectory -- add directory to path for Yacas scripts
Internal function
Calling format:
Parameters:
path -- a string containing a full path where yacas script files reside
Description:
When loading files, yacas is also allowed to
look in the folder "path". path will be prepended
to the file name before trying to load the file.
This means that "path" should end with a forward slash (under Unix-like
operating systems).
Yacas first tries to load a file from the current
directory, and otherwise it tries to load from
directories defined with this function, in the
order they are defined. Note there will be at least one directory
specified at start-up time, defined during compilation. This
is the directory Yacas searches for the initialization scripts
and standard scripts.
Examples:
In> DefaultDirectory("/home/user/myscripts/");
Out> True;
|
See also:
Load
,
Use
,
DefLoad
,
FindFile
,
DllDirectory
.
DllDirectory -- add directory to path for Yacas plugins
Internal function
Calling format:
Parameters:
path -- a string containing a full path where Yacas plugins reside
Description:
This command adds "path" to the list of directories in which Yacas
looks for plugins.
Note there will be at least one directory specified at start-up
time. If the command line option --dlldir is given, the default
directory for plugins will be the argument to the option. Otherwise,
it is a directory specified at compile time.
This command always evaluates to True.
Examples:
In> DllDirectory("/home/user/yacas/plugins/");
Out> True;
|
See also:
DefaultDirectory
,
DllLoad
.
PrettyPrinter, GetPrettyPrinter -- set/get routine to use as pretty-printer
Standard library
Calling format:
PrettyPrinter(printer)
PrettyPrinter()
GetPrettyPrinter()
|
Parameters:
printer -- a string containing the name of a function that can "pretty-print" an expression.
Description:
This function sets up the function printer to print out the results on
the command line. This can be reset to the internal printer with PrettyPrinter() (when no argument is given, the system returns to the default).
Currently implemented prettyprinters are: PrettyForm, TeXForm, Print, OMForm, CForm and DefaultPrint.
GetPrettyPrinter() returns the current pretty printer, or it returns
an empty string if the default pretty printer is used.
Examples:
In> Taylor(x,0,5)Sin(x)
Out> x-x^3/6+x^5/120;
In> PrettyPrinter("PrettyForm");
True
In> Taylor(x,0,5)Sin(x)
3 5
x x
x - -- + ---
6 120
In> PrettyPrinter();
Out> True;
In> Taylor(x,0,5)Sin(x)
Out> x-x^3/6+x^5/120;
|
See also:
PrettyForm
,
Write
,
TeXForm
,
CForm
,
OMForm
.
MaxEvalDepth -- set depth of recursion stack
Internal function
Calling format:
Parameters:
n -- integer
Description:
Sets the maximum depth of recursive function call. An error message is printed when too many recursive calls are executed, and this function can be used to increase or decrease the limit as necessary.
Help -- get documentation for some command
Standard library
Calling format:
Parameters:
function -- a string containing the name of a function to show help for
Description:
When help is requested by the user, by typing ?function or ??, the functions Help() (for ??) and Help(function) (for ?function) are called. By default, lynx is used as a
browser (another recommended text-only browser is links). The help resides in the subdirectory documentation/ under the directory the math scripts
were installed in. So the help files can be found using FindFile.
The function Help is auxiliary and should not be used to actually get online help.
Examples:
To use netscape for browsing help, enter the following commands:
Help(_f) <-- SystemCall("netscape " :
FindFile("documentation/ref.html"):"#":f);
Help() := SystemCall("netscape " :
FindFile("documentation/books.html"));
|
See also:
SystemCall
,
FindFile
,
?
.
HistorySize -- set size of history file
Internal function
Calling format:
Parameters:
n -- number of lines to store in history file
Description:
When exiting, yacas saves the command line history to a
file ~/.yacas_history. By default it will
save the last 1024 lines. The default can be
overridden with this function. Passing -1 tells the system to save all
lines.
Examples:
In> HistorySize(200)
Out> True;
In> quit
|
See also:
quit
.