Next: , Previous: The break loop, Up: Program development

5.5 Describe and Inspect

— Function: describe object

Prints the information about object to the stream that is the value of *standard-output*. The description of an object consists of several fields, each of which is described in a recursive manner. For example, a symbol may have fields such as home package, variable documentation, value, function documentation, function binding, type documentation, deftype definition, properties.

— Function: inspect object

Prints the information about object in an interactive manner. The output of inspect is similar to that of describe, but after printing the label and the value of a field (the value itself is not describe 'd), it prompts the user to input a one-character command. The input to inspect is taken from the stream that is the value of *query-io*. Normally, the inspection of object terminates after all of its fields have been inspected. The following commands are supported:

Next. Goes to the next level; the field is inspected recursively.
Skip. Skips the inspection of the field. inspect proceeds to the next field.
Print. Pretty-prints the field and prompts again.
u form
Update. The form is evaluated and the field is replaced by the resulting value. If the field cannot be updated, the message Not updated. will be printed.
Abort. Aborts the inspection of the current object. The field and the rest of the fields are not inspected.
e form
Eval. Evaluates the specified form in the null environment and prints the resulting values. Then prompts again with the same field.
Quit. Aborts the entire inspection.
Help. Lists the inspect commands.