All Manuals > LispWorks® User Guide and Reference Manual > 4 The REPL Inspector

4.1 Describe

The function describe displays the slots of composite data structures in a manner dependent on the type of the object. The slots are labeled with a name where appropriate, or otherwise with a number.

The example below shows the result of calling describe on a simple list.

USER 7 > (setq countries '("Chile" "Peru" "Paraguay"
("Chile" "Peru" "Paraguay" "Brazil")
USER 8 > (describe countries)
("Chile" "Peru" "Paraguay" "Brazil") is a CONS
[0] : "Chile"
[1] : "Peru"
[2] : "Paraguay"
[3] : "Brazil"

describe describes slots recursively up to a limit set by the special variable *describe-level*. Note that only arrays, structures and conses are printed recursively. The slots of all other object types are only printed when at the top level of describe.

*describe-level* has an initial value of 1.

The symbols *DESCRIBE-PRINT-LEVEL* and *describe-print-length* are similar in effect to *trace-print-level* and *trace-print-length*. They control, respectively, the depth to which nested objects are printed (initial value 10), and the number of components of an object which are printed (initial value 10).

To customize describe, define new methods on the generic function describe-object.

LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:18