[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 currently being loaded, if any, 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:

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

    [top][index]
    search for: