DefaultDirectory , PrettyPrinter , Help , HistorySize , Startup configuration

Startup configuration

Yacas allows you to configure a few things at startup. The file ~/.yacasrc will be executed when Yacas is run. The followinf functions can be useful when used in the ~/.yacasrc file.


DefaultDirectory

Internal function
Calling Sequence:
DefaultDirectory(path)
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 ,


PrettyPrinter

Standard math library
Calling Sequence:
PrettyPrinter(printer)
Parameters:
printer - a string containing the name of a function that can pretty-print an expression
Description:
PrettyPrinter(printer) sets up the function printer to print out the results on the command line.
This function can be reset to the internal printer with PrettyPrinter()
Examples:
In> Taylor(x,0,5)Sin(x)
Out> x-x^3/6+x^5/120;
In> PrettyPrinter("PrettyForm");

True

Out> 
In> Taylor(x,0,5)Sin(x)

     3    5 
    x    x  
x - -- + ---
    6    120

Out> 
In> PrettyPrinter();
Out> True;
In> Taylor(x,0,5)Sin(x)
Out> x-x^3/6+x^5/120;
See Also:
PrettyForm , Write ,


Help

Standard math library
Calling Sequence:
Help()
Help(function)
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. 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.
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

Internal function
Calling Sequence:
HistorySize(n)
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 only save the last 50 lines, to save space on the harddisk. This can be overridden with this function. Passing -1 tells the system to save all the lines.
Examples:
In> HistorySize(200)
Out> True;
In> quit
See Also: