Next Previous Up Top Contents Index

3 The TTY Inspector

3.2 Inspect

The functioninspect is an interactive version ofdescribe. It displays objects in a similar way todescribe. Entering the teletype inspector causes a new level of the top loop to be entered with a special prompt indicating that the inspector has been entered and showing the current inspector level.

In the modified top loop, if you enter a slot name, that slot is inspected and the current object is pushed onto an internal stack of previously inspected objects. The special variables$,$$, and$$$ are bound to the top three objects on the inspector stack.

The following keywords are also treated specially by the inspector.

Table 3.1 Inspector keywords

:d

Display current object.

:dm

Display more of current object.

:i m

Recursively invoke a new inspector. m is an object to inspect.

:q

Quit current inspector.

:s n v

Sets slot n to value v.

:sh

Show inspector stack.

:u int

Undo last inspection. If you supply an optional integer argument, int, then the last int inspections are undone.

:ud

Undo last inspection and redisplay current object.

:m

Change the inspection mode -- see Section 3.3 on page 22.

The variablessys::*inspect-print-level* andsys::*inspect-print-length* are similar tosys::*describe-print-level* andsys::*describe-print-length* (see above).

:dm displays more slots of the current object. If the object has more thansys::*describe-length* slots, then the first*describe-length* will be printed, followed by an ellipsis and then

(:dm for more)

If you type:dm at the prompt, the next*describe-length* slots are displayed. This only works on the last inspected object, so if you recursively inspect a slot and come back,:dm does not do anything useful. Typing:d lets you view the object again.

:ud is equivalent to typing:u followed by:d.


LispWorks User Guide - 14 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker