Function: math[load] - reads functions and packages from Maple Libraries and the Share Library
Calling Sequence:
load(n);
Parameters:
n - sequence of one or more function names or package names
Description:
math/load loads functions both from a Maple library and thus also the Share Library. If the name of a package is specified, it assigns the short names (see with ).
Internally load first tries to find the Share Library and assigns the path to it to
libname
. For each argument k, load then first tries to find the file <k>.m in the libraries pointed to by libname. If it finds the file, then it is read.
If the variable k is of type table then load assumes that it has found a package table and tries to assign the short names of the package functions by calling with(k).
If k is not of type table then a library function has been found.
After all arguments have been processed, the path to the Share Library included in libname is deleted if the global environment variable _utilsShareRemove has been set true (default is false). If sharename has been wrongly assigned, i.e. it does not point to the Share Library, then it is automatically set to the correct path.
load checks whether Share has been invoked before through with(share); if true, then the global variable _utilsShareIsInitialized is assigned true; if not, _utilsShareIsInitialized remains unassigned.
The return of load is a list of those functions and/or packages that have been successfully read. As a `side effect` the functions and packages found with load can be used in the session. Also the global variable _utilsLoadLoaded is assigned a list of all those functions and packages that have been found and loaded by load during a Maple session.
Various levels of user information will be displayed during the computation if infolevel[`utils/load`] or infolevel[load] is assigned a value of 2 or 3.
The function uses three help functions: IsShareUsable, IsShareLibrary, and sharefind, which can be independently readlib'ed from the package.
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, load).
Examples:
> restart: with(math, load):
> load(FPS, linalg, iscont);
Warning, new definition for norm
Warning, new definition for trace
> FPS(sin(x), x=0);
> rank(matrix(3,3, [x,1,0,0,0,1,x*y,y,1]));
> iscont(1/x, x=-1 .. 1);
> infolevel[load] := 3:
> load(profile, linalg, donotexist);
IsShareUsable: checking for a path to Share in libname
IsShareUsable: path e:\maplev51\share in libname points to Share.
IsShareUsable: sharename e:\maplev51\share points to Share
IsShareUsable: success: sharename and path to Share in libname are equal.
load: trying to find profile
load: found profile
load: library function profile successfully assigned
load: trying to find linalg
load: Warning, linalg already read by load.
load: trying to find donotexist
Warning, donotexist has not been found.
> _utilsLoadLoaded;
See Also:
readlib , with , Share Library .
Version History:
Version 1.00 - May 20, 1997
Version 2.00R5 - May 06, 1998
Version 2.00R4 - May 16, 1998
Version 2.1R4 - June 26, 1999
Version 2.1R5 - June 26, 1999