|
3.1.7 Startup sequence
On start-up, SINGULAR
-
loads the library
standard.lib (provided the --no-stdlib
option was not given),
-
searches the current directory and then the
home directory of the user, and then all directories contained in the
library
SearchPath (see Loading a library for more info
on SearchPath ) for a file named .singularrc and
executes it, if found (provided the --no-rc option was not
given),
-
executes the string specified with the
--execute command line
option,
-
executes the files
file1 , file2 ... (given on the command
line) in that order.
Note: .singularrc file(s) are an approriate place for
setting some default values of (command-line) options.
For example, a system administrator might remove the locally installed
HTML version of the manual and put a .singularrc file
with the following content
| if (system("version") >= 1306) // assure backwards-compatibility
{
system("--allow-net", 1);
}; // the last semicolon is important: otherwise no ">", but "." prompt
| in the directory containing the SINGULAR libraries, thereby
allowing to fetch the HTML on-line help from the WWW home-site of
SINGULAR.
On the other hand, a single user might put a .singularrc with the
following content
| if (system("version") >= 1306) // assure backwards-compatibility
{
if (! system("--emacs"))
{
// set default browser to info, unless we run within emacs
system("--browser", "info");
}
}; // the last semicolon is important: otherwise no ">", but "." prompt
| in his home directory, which sets the default help browser to
info (unless SINGULAR is run within emacs) and thereby
prevents the execution of the"global"
.singularrc file installed by the system administrator (since the
.singularrc file of the user is found before the "global"
.singularrc file installed by the system administrator).
|