5.1.14 Changes to the inspector
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 callingdescribe
on a simple list.
USER 7 > (setq countries '("Chile" "Peru" "Paraguay" "Brazil")) ("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 ofdescribe
.*describe-level*
has an initial value of 2.
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 customizedescribe
, define new methods on the generic functiondescribe-object
.
Generated with Harlequin WebMaker