MTS 8: LISP and SLIP in MTS
June 1976
(1) The first bound value of a particular atom A that occurred after
that EVAL block was created.
(2) If the EVAL block is a COND, PROG, SELECT, AND, OR, or a
LAMBDA-expression, or any function specification which eventual-
ly produced a LAMBDA-expression to be applied, then DISPLAY will
return the next COND or SELECT expression to be processed, the
next PROG expression to be EVALed, or the next subform of the
LAMBDA to be EVALed.
(3) The level of the EVAL block (starting with depth 1 for the
top-level form).
The first argument to DISPLAY has the same significance as the first
argument of UNEVAL. If it is an integer, it refers to the Nth or
Nth-previous EVAL block. If it is not an integer, it refers to the most
recent EVAL block which has STACKID as its CAR. As in UNEVAL, a
negative integer references the Nth previous form. If the EVAL block
referenced does not exist, an error will be generated.
The second argument to DISPLAY is: B for binding (option 1 above), F
for form (option 2 above), and L for level (option 3 above).
The third argument to DISPLAY is given whenever the second argument
is B. It is the atom whose binding is to be found. If A was never
bound after the EVAL block referenced was created, then the current
VALUE of A is returned. If a binding of A is found, then the VALUE
stored on the stack will be returned. (This is the old VALUE of A, that
is, the VALUE which was saved away to be restored on exit from a PROG or
LAMBDA.)
Note: In DISPLAY mode F, it is possible to find a COND, SELECT,
PROG, AND, OR, or a LAMBDA block on the stack which is not yet being
executed. This will occur if the user issues an attention interrupt
during the binding of the PROG-variables, or during evaluation of the
arguments of a LAMBDA function. In this case, there is no "next form"
defined for that block, and an error will be generated.
DISPLAY is an N-type function, and its arguments are not EVALed.
(MODIFY STACKID B,F A S) ____________________________
The MODIFY function allows the user to modify one of the bindings or
expressions accessible from DISPLAY.
The argument of MODIFY have the same significance as those of
DISPLAY, except that S will replace the saved value of A (in B mode) or
the next expression to be processed (in F mode).
62 LISP

MTS 8: LISP and SLIP in MTS
June 1976 Page Revised February 1979
MODIFY, like DISPLAY, is an N-type function. However, S will be
EVALed and its VALUE will be used as the replacement binding or
expression.
The VALUE returned from MODIFY is the value of S.
(ERR S) _______
This function generates a type 15 error (see the later subsection
"Error Codes"), with S treated as the expression which generated the
error (error expression). In addition, the atom ERR is set to S.
(STEP N1 N2) ______________
The STEP function causes subsequent entries to EVAL, exits from EVAL,
or both, to be counted. When this count reaches N1, an error is
generated. The error message "STEP DONE - IN" or "STEP DONE - OUT" will
be printed. The error form will be the argument to EVAL for "IN", and
the value being returned from EVAL for "OUT".
Under standard error processing, a traceback will be printed and a
break loop entered. The user may, however, substitute other actions by
defining his own error functions for the STEP errors.
If N2 is 1, STEP will count only the number of times EVAL is entered;
is N2 is 2, it will count only the number of times EVAL is exited. If
N2 is 3, STEP will count both entries to and exits from EVAL. N2
defaults to 1. Any error which occurs under step control will terminate
the counting process.
(STEP NIL) causes step control to terminate.
(TRACE A1...AN) and (UNTRACE A1...AN) _____________________________________
The TRACE function allows the user to put an internal trace indicator
on an atom. Whenever that atom is called as a function, the atom and
its arguments will be printed on entry, and the VALUE returned will be
printed on exit. UNTRACE removes the internal trace indicator.
System tracing can be disabled globally by calling UNTRACE with no
arguments. Any call to TRACE will cause system tracing to be in effect
again, e.g., (TRACE).
LISP 63
Previous Page Next Page