Macaulay2 » Documentation
Packages » Macaulay2Doc > The Macaulay2 language > system facilities > load
next | previous | forward | backward | up | index | toc

load -- read Macaulay2 commands

Description

load "f" -- reads and executes Macaulay2 expressions found in the file named f.

The file is sought in the directory containing the file currently being loaded, if any, and then along the path, unless the name of the file begins with /, $, or !. If the file begins with ./ or ../, then it looks instead in the directory of the file currently being loaded (see currentFileDirectory). If no file is being loaded it will look in the current directory (see currentDirectory).

The file is read without echoing the input, printing the values, or incrementing the line number.

If one of the top level expressions in the file evaluates to the symbol end the reading of the file is stopped at that point.

If the variable notify is set to true, then an informational message is displayed after the file is loaded.

See also

For the programmer

The object load is a function closure.