Next: , Previous: , Up: Design Choices and Extensions   [Contents][Index]


2.8 Describe

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.

A number of switches can be used to control describe’s behavior.

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*
Variable: extensions:*describe-print-length*

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


Next: The Inspector, Previous: Garbage Collection, Up: Design Choices and Extensions   [Contents][Index]