Special Function Call Frames Reference (Visual LISP IDE)

There are two special function call frames: FOREACH and REPEAT.

Note: The Visual LISP IDE is available on Windows only.

FOREACH Frame

The FOREACH frame indicates a call to the foreach function. In the Trace Stack window, right-click (FOREACH …) and click Local Variables to display the name and current value of the user-supplied variable and list variables bound by the foreach function. For example, if the following expression were evaluated

(foreach n '(a b c) (print n))

then selecting the Local Variables option displays a Frame Binding window similar to the following:

This Frame Binding window identifies the user-supplied variable (N), the current value of that variable (A), and the items remaining to be processed in the list supplied to foreach (BC).

REPEAT Frame

The REPEAT frame indicates a call to the repeat function. In the Trace Stack window, right-click (REPEAT …) and click Local Variables to display the special name counter and the current value of the repeat internal counter. The internal counter value is initially set to the integer value passed to repeat, indicating the number of iterations desired. The counter decreases by one at each loop iteration. It shows the number of iterations remaining, minus one.

Note: Each repeat expression has its own counter, but only one such counter variable can be added to the Watch window.

AutoLISP functions such as if, cond, and, and setq do not appear on the stack. They are not necessary because their call position may be viewed within the source file in the Visual LISP text editor window.