Controls the depth to which describe describes arrays, structures and conses.
The variable
*describe-level*
controls the depth to which the function describe describes arrays, structures and conses.
Note: the describe functionality is load-on-demand in the LispWorks image as shipped. Therefore if you have not do
(require "describe")
or called describe,
*describe-level*
may be unbound.
CL-USER 23 > (describe 1)
[... load output not shown ...]
1 is a BIT
DECIMAL 1
HEX 1
OCTAL 1
BINARY 1
CL-USER 24 > *describe-level*
1
CL-USER 25 > (defstruct foo a s d)
FOO
CL-USER 26 > (defmethod describe-object ((f foo) (s stream))
(format s "FOO ~S~%" f)
(describe (foo-a f) s))
#<STANDARD-METHOD DESCRIBE-OBJECT NIL (FOO STREAM) 2068295C>
CL-USER 27 > (describe (make-foo :a (vector 1 2 3) :s 42))
FOO #S(FOO A #(1 2 3) S 42 D NIL)
#(1 2 3)
To make describe operate on objects inside the structure instance, increase the value of
*describe-level*
:
CL-USER 28 > (setf *describe-level* 2)
2
CL-USER 29 > (describe (make-foo :a (vector 1 2 3) :s 42))
FOO #S(FOO A #(1 2 3) S 42 D NIL)
#(1 2 3) is a SIMPLE-VECTOR
0 1
1 2
2 3