Scheme 48 Manual | Contents | In Chapter: Command processor
Previous: Current focus value and ## | Next: Logistical commands

Command levels

If an error, keyboard interrupt, or other breakpoint occurs, or the ,push command is used, the command processor invokes a recursive copy of itself, preserving the dynamic state of the program when the breakpoint occured. The recursive invocation creates a new command level. The command levels form a stack with the current level at the top. The command prompt indicates the number of stopped levels below the current one: > or : for the base level and n> or n: for all other levels, where n is the command-level nesting depth. The auto-levels switch described below can be used to disable the automatic pushing of new levels.

The command processor's evaluation package and the value of the inspect-focus-value switch are local to each command level. They are preserved when a new level is pushed and restored when it is discarded. The settings of all other switches are shared by all command levels.

<eof>
Discards the current command level and resumes running the level down. <eof> is usually control-D at a Unix shell or control-C control-D using the Emacs cmuscheme48 library.
,pop
The same as <eof>.
,proceed [exp ...]
Proceed after an interrupt or error, resuming the next command level down, delivering the values of exp ... to the continuation. Interrupt continuations discard any returned values. ,Pop and ,proceed have the same effect after an interrupt but behave differently after errors. ,Proceed restarts the erroneous computation from the point where the error occurred (although not all errors are proceedable) while ,pop (and <eof>) discards it and prompts for a new command.
,push
Pushes a new command level on above the current one. This is useful if the auto-levels switch has been used to disable the automatic pushing of new levels for errors and interrupts.
,reset [number]
Pops down to a given level and restarts that level. Number defaults to zero, ,reset restarts the command processor, discarding all existing levels.

Whenever moving to an existing level, either by sending an <eof> or by using ,reset or the other commands listed above, the command processor runs all of the dynamic-wind "after" thunks belonging to stopped computations on the discarded level(s).

Previous: Current focus value and ## | Next: Logistical commands