<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>load -- read Macaulay2 commands</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_needs.html">next</a> | <a href="_input.html">previous</a> | <a href="_needs.html">forward</a> | <a href="_input.html">backward</a> | <a href="_system_spfacilities.html">up</a> | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <div><a href="index.html" title="">Macaulay2Doc</a> > <a href="___The_sp__Macaulay2_splanguage.html" title="">The Macaulay2 language</a> > <a href="_system_spfacilities.html" title="">system facilities</a> > <a href="_load.html" title="read Macaulay2 commands">load</a></div> <hr/> <div><h1>load -- read Macaulay2 commands</h1> <div class="single"><h2>Description</h2> <div><tt>load "f"</tt> -- reads and executes Macaulay2 expressions found in the file named <tt>f</tt>.<p>The file is sought in the directory containing the file currently being loaded, if any, and then along the <a href="_path.html" title="list of directories to look in">path</a>, unless the name of the file begins with <tt>/</tt>, <tt>$</tt>, or <tt>!</tt>. If the file begins with <tt>./</tt> or <tt>../</tt>, then it looks instead in the directory of the file currently being loaded (see <a href="_current__File__Directory.html" title="the directory containing the current input file">currentFileDirectory</a>). If no file is being loaded it will look in the current directory (see <a href="_current__Directory.html" title="current working directory">currentDirectory</a>).</p> <p>The file is read without echoing the input, printing the values, or incrementing the line number.</p> <p>If one of the top level expressions in the file evaluates to the symbol <a href="_end.html" title="stop loading a file">end</a> the reading of the file is stopped at that point.</p> <p>If the variable <a href="_notify.html" title="whether to notify the user when a file is loaded">notify</a> is set to true, then an informational message is displayed after the file is loaded.</p> </div> </div> <div class="single"><h2>See also</h2> <ul><li><span><a href="_path.html" title="list of directories to look in">path</a> -- list of directories to look in</span></li> <li><span><a href="_needs.html" title="read Macaulay2 commands if necessary">needs</a> -- read Macaulay2 commands if necessary</span></li> <li><span><a href="_input.html" title="read Macaulay2 commands and echo">input</a> -- read Macaulay2 commands and echo</span></li> <li><span><a href="_notify.html" title="whether to notify the user when a file is loaded">notify</a> -- whether to notify the user when a file is loaded</span></li> </ul> </div> </div> </body> </html>