REDUCE

12.1 IN Command

This command takes a list of file names as argument and directs the system to input each file (that should contain REDUCE statements and commands) into the system. File names can either be an identifier or a string. The explicit format of these will be system dependent and, in many cases, site dependent. The explicit instructions for the implementation being used should therefore be consulted for further details. For example:

        in f1,"ggg.rr.s";

will first load file f1, then ggg.rr.s. When a semicolon is used as the terminator of the in statement, the statements in the file are echoed on the terminal or written on the current output file. If $is used as the terminator, the input is not shown. Echoing of all or part of the input file can be prevented, even if a semicolon was used, by placing an off echo; command in the input file.

Files to be read using in should end with ;end;. Note the two semicolons! First of all, this is protection against obscure difficulties the user will have if there are, by mistake, more begins than ends on the file. Secondly, it triggers some file control book-keeping which may improve system efficiency. If end is omitted, an error message "End-of-file read" will occur.

While a file is being loaded, the special identifier !__line__ is replaced by the number of the current line in the file currently being read. Similarly, !__file__ is replaced by the name of the file currently being read.


Hosted by Download REDUCE Powered by MathJax