Next: Debug, Previous: Repl, Up: Session Support [Contents][Index]
When displaying error messages and warnings, it is paramount that the output generated for circular lists and large data structures be limited. This section supplies a procedure to do this. It could be much improved.
Notice that the neccessity for truncating output eliminates Common-Lisp’s Format from consideration; even when variables
*print-level*
and*print-level*
are set, huge strings and bit-vectors are not limited.
qp
writes its arguments, separated by spaces, to
(current-output-port)
. qp
compresses printing by
substituting ‘...’ for substructure it does not have sufficient
room to print. qpn
is like qp
but outputs a newline
before returning. qpr
is like qpn
except that it returns
its last argument.
*qp-width* is the largest number of characters that qp
should use. If *qp-width* is #f, then all items will be
write
n. If *qp-width* is 0, then all items except
procedures will be write
n; procedures will be indicated by
‘#[proc]’.