next up previous contents
Next: 2.7 The Inspector Up: 2 Design Choices and Previous: 2.5.3 Finalization

2.6 Describe

In addition to the basic function described below, there are a number of switches and other things that can be used to control describe's behavior.

[Function]
describe object &optional stream

The describe function prints useful information about object on stream, which defaults to *standard-output*. For any object, describe will print out the type. Then it prints other information based on the type of object. The types which are presently handled are:

 hash-table
describe prints the number of entries currently in the hash table and the number of buckets currently allocated.

 function
describe prints a list of the function's name (if any) and its formal parameters. If the name has function documentation, then it will be printed. If the function is compiled, then the file where it is defined will be printed as well.

 fixnum
describe prints whether the integer is prime or not.

 symbol
The symbol's value, properties, and documentation are printed. If the symbol has a function definition, then the function is described.

If there is anything interesting to be said about some component of the object, describe will invoke itself recursively to describe that object. The level of recursion is indicated by indenting output.

[Variable]
extensions:*describe-level*

The maximum level of recursive description allowed. Initially two.

[Variable]
extensions:*describe-indentation*

The number of spaces to indent for each level of recursive description, initially three.

[Variable]
extensions:*describe-print-level*

extensions:*describe-print-length*

The values of *print-level* and *print-length* during description. Initially two and five.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997