Next: , Previous: The tracer, Up: Program development


5.2 The Stepper

— Macro: step form

Starts evaluating the form in the single-step mode. In this mode, before any form is evaluated, the Stepper will print the form and prompt the user for a Stepper command. The Stepper binds the two variables print-level and print-length both to 2, so that the current form may not occupy too much space on the screen. A Stepper command will be executed when the user types the single character for the command followed by the required arguments, if any, and presses the newline key. If the user presses the newline key without having typed any character, then the Stepper will assume that the Stepper command n was abbreviated.

The stepper commands are:

Newline
Next. Evaluates the current form in the single-step mode.
:s, :skip
Skip. Evaluates the current form in the ordinary mode. The single-step mode will be resumed at completion of the evaluation.
:b, :back
Backwards. Steps back to previous step form.
:pr, :print
Print. Pretty-prints the current form.
:form
Form. Return the current form. Nothing is done, but the current form is returned as the value of this command. As a consequence, it is printed by the top level in the usual way and saved in the variable *. The main purpose of this command is to allow the current form to be examined further by accessing *.
:ret, :return
Return. Return without evaluating the current form.
:x, :exit
Exit. Evaluates the current form and any other forms in the ordinary mode.
?
Help. Lists the commands.