Interactive File Control
Date: 2020-10-07 18:10:00

Up | Prev | PrevTail | Tail

### 13.3 Interactive File Control

If input is coming from an external ﬁle, the system treats it as a batch processed calculation. If the user desires interactive response in this case, he can include the command ON INT; in the ﬁle. Likewise, he can issue the command off int; in the main program if he does not desire continual questioning from the system. Regardless of the setting of INT, input commands from a ﬁle are not kept in the system, and so cannot be edited using ED. However, many implementations of REDUCE provide a link to an external system editor that can be used for such editing. The speciﬁc instructions for the particular implementation should be consulted for information on this.

Two commands are available in REDUCE for interactive use of ﬁles. PAUSE; may be inserted at any point in an input ﬁle. When this command is encountered on input, the system prints the message CONT? on the user’s terminal and halts. If the user responds Y (for yes), the calculation continues from that point in the ﬁle. If the user responds N (for no), control is returned to the terminal, and the user can input further statements and commands. Later on he can use the command cont; to transfer control back to the point in the ﬁle following the last PAUSE encountered. A top-level pause; from the user’s terminal has no eﬀect.

Up | Prev | PrevTail | Front