[top][index]
search for:

load -- read Macaulay 2 commands

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

The file is sought in the directory containing the file in which the call to load is, and then along the path, unless the name of the file begins with the character(s) in pathSeparator. The file is read without echoing the input, printing the values, or incrementing the line number.

See also:

  • path -- list of directories to look in
  • needs -- read Macaulay 2 commands if necessary
  • input -- read Macaulay 2 commands and echo
  • Code:

         -- code for load:
         -- ../m2/setup.m2:199-201
         load = (filename) -> (
              if not tryload(filename,oldLoad) then error ("can't open file ", filename)
              )

    [top][index]
    search for: