|
5.2.11 load
Syntax:
load( string_expression );
Type:
- none
Purpose:
- reads a library of procedures from a file. In contrast to the command
LIB , the command load does not add the procedures of the
library to the package Top , but only to the package corresponding
to the library. If the given filename does
not start with . or /, the following directories are
searched for it (in the given order): the current directory, the
directories given in the environment variable SINGULARPATH , some
default directories relative to the location of the SINGULAR
executable program, and finally some default absolute directories.
You can view the search path which SINGULAR uses to locate its
libraries, by starting up SINGULAR with the option -v ,
or by issuing the command system("with"); .
All loaded libraries are displayed by the listvar(package);
command:
Each time a library ( Libraries) / dynamic module ( Dynamic loading) is loaded, the corresponding package is created, if it does
not already exist.
The name of a package corresponding to a SINGULAR library is
derived from the name of the library file. The first letter is
capitalized and everything to right of the left-most dot is
dropped.
For a dynamic module the packagename is hard-coded in the binary file.
Only the names of the procedures in the library are loaded, the body of
the procedures is read during the first call of this procedure. This minimizes
memory consumption by unused procedures. When SINGULAR is started
with the -q or --quiet option, no message about the
loading of a library is displayed.
See
Command line options;
Dynamic modules;
LIB;
Procedures and libraries;
SINGULAR libraries;
exportto;
importfrom;
package;
proc;
standard_lib;
string;
system.
|