Mode Handling Declarations
Date: 2020-10-07 18:10:00

Up | Next | Prev | PrevTail | Tail

### 6.2 Mode Handling Declarations

The ON and OFF declarations are available to the user for controlling various system options. Each option is represented by a switch name. ON and OFF take a list of switch names as argument and turn them on and oﬀ respectively, e.g.,

on time;

causes the system to print a message after each command giving the elapsed CPU time since the last command, or since TIME was last turned oﬀ, or the session began. Another useful switch with interactive use is DEMO, which causes the system to pause after each command in a ﬁle (with the exception of comments) until a Return is typed on the terminal. This enables a user to set up a demonstration ﬁle and step through it command by command.

As with most declarations, arguments to ON and OFF may be strung together separated by commas. For example,

off time,demo;

will turn oﬀ both the time messages and the demonstration switch.

We note here that while most ON and OFF commands are obeyed almost instantaneously, some trigger time-consuming actions such as reading in necessary modules from secondary storage.

A diagnostic message is printed if ON or OFF are used with a switch that is not known to the system. For example, if you misspell DEMO and type

on demq;

you will get the message

***** DEMQ not defined as switch.

Up | Next | Prev | PrevTail | Front