Next Previous Up Top Contents Index

3 The TTY Inspector

3.1 Describe

The functiondescribe 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"

describedescribes slots recursively up to a limit set by the special variablesystem::*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.

system::*describe-level* has an initial value of 2.

The symbols system::*describe-print-level* andsystem::*describe-print-length* are similar in effect tohcl:*trace-print-level* andhcl:*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.


LispWorks User Guide - 14 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker