IN Command
Date: 2020-10-07 18:10:00

Up | Next | Tail

### 12.1 IN Command

This command takes a list of ﬁle names as argument and directs the system to input each ﬁle (that should contain REDUCE statements and commands) into the system. File names can either be an identiﬁer 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 ﬁrst load ﬁle f1, then ggg.rr.s. When a semicolon is used as the terminator of the IN statement, the statements in the ﬁle are echoed on the terminal or written on the current output ﬁle. If $is used as the terminator, the input is not shown. Echoing of all or part of the input ﬁle can be prevented, even if a semicolon was used, by placing an off echo; command in the input ﬁle.

Files to be read using IN should end with ;END;. Note the two semicolons! First of all, this is protection against obscure diﬃculties the user will have if there are, by mistake, more BEGINs than ENDs on the ﬁle. Secondly, it triggers some ﬁle control book-keeping which may improve system eﬃciency. If END is omitted, an error message "End-of-file read" will occur.

While a ﬁle is being loaded, the special identiﬁer !__LINE__ is replaced by the number of the current line in the ﬁle currently being read. Similarly, !__FILE__ is replaced by the name of the ﬁle currently being read.

Up | Next | Front