4.6 Reference Pages

4.6.2 The Stepper

*max-step-indentation* Variable

Syntax:*max-step-indentation*

The variable*max-step-indentation* sets the maximum number of spaces allowed for indentation of the Stepper's output. The default value is 60.

step Macro

Syntax:step form | {function-name}+

The macrostep allows you to examine the behavior of programs by stepping through the evaluation of functions.

The macrostep can be called on any compiled or interpreted function. It displays only the evaluation steps that are performed interpretively, so it is most useful when called on interpreted functions.

> (defun f (x) (when x (1+ x)))
F

> (step (f 1)) (F 1) -> :n (FUNCTION F) -> :n #<Interpreted-Function (NAMED-LAMBDA F (X) (BLOCK F (WHEN X #))) 50A217> 1 = 1 (BLOCK F (WHEN X (1+ X))) -> :s 2 2 2

> (step f) (F) ;; The Stepper prompt --> indicates that the displayed form is a macro ;; expansion.

> (f 1) (BLOCK F (WHEN X (1+ X))) -> :n (WHEN X (1+ X)) --> :n X = 1 (1+ X) -> :u 2 2 2 2

See Also: trace, untrace

*step-columns-per-level* Variable

Syntax:*step-columns-per-level*

The variable*step-columns-per-level* controls how many columns are added to the Stepper's output for each level of function call. The value is an integer; the default value is 2.

*step-level* Variable

Syntax:*step-level*

The variable*step-level* represents how deeply nested the call to the macrostep is.

The value is an integer.

> *step-level*
0


The User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker