REDUCE

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 off 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 off, or the session began. Another useful switch with interactive use is demo, which causes the system to pause after each command in a file (with the exception of comments) until a Return is typed on the terminal. This enables a user to set up a demonstration file 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 off both the time messages and the demonstration switch.

We note here that while most on and off commands are obeyed almost instantaneously, some trigger slower 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.


Hosted by Download REDUCE Powered by MathJax