<?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>input -- read Macaulay2 commands and echo</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="_load.html">next</a> | <a href="_initialization_spfile.html">previous</a> | <a href="_load.html">forward</a> | <a href="_initialization_spfile.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="_input.html" title="read Macaulay2 commands and echo">input</a></div> <hr/> <div><h1>input -- read Macaulay2 commands and echo</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>input fn</tt></div> </dd></dl> </div> </li> <li><div class="single">Inputs:<ul><li><span><tt>fn</tt>, <span>a <a href="___String.html">string</a></span></span></li> </ul> </div> </li> <li><div class="single">Consequences:<ul><li>reads and executes the commands found in the file whose name is contained in the string <tt>fn</tt>, echoing the input, printing the values, and incrementing the line number</li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div><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>, <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>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 an error occurs while evaluating the expressions in the file, reading is stopped.</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="_load.html" title="read Macaulay2 commands">load</a> -- read Macaulay2 commands</span></li> </ul> </div> </div> </body> </html>