Interactive commands

In a HOPE session, any definitions may be entered (although private will be ignored), as well as the following commands:

expression;
display the value and most general type of expression. Lazy evaluation is used, but nothing is displayed until the value is fully evaluated.

The expression may involve the special variable input, which denotes the list of characters typed at the terminal.

write expression [to " file"];
output the value of expression (which must be a list of values) more directly: if the value is a list of characters, the characters are printed; otherwise each value is printed on a line by itself. Each element of the list is printed as soon as its value is computed (by lazy evaluation). If the to clause is present, the output is written to the file; otherwise it is printed on the screen. It is safe to write to a file that is read by the expression--no interference will occur.

The expression may involve the special variable input, which denotes the list of characters typed at the terminal.

display;
display the definitions of the current session.

save module-identifier;
save the definitions of the current session in a new module of the given name. The definitions are replaced in the current session by a reference to the new module.

edit [ module-identifier];
(Unix only) invoke the default editor on the named module, if given, or otherwise on a file containing the current definitions, and then re-enter the interpreter with the revised definitions.

exit;
exit from the interpreter.



Ross Paterson <ross@soi.city.ac.uk>