[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: print control for HUGE objects



>     I have list of length >2000, and when i (step), they whole thing is
>     dumped on my screen whenever it is an argument to anything. This is
>     awfully annoying. Is there a way to tell lisp to print lists of length
>     >30 in a smart way - like the first 10 elements, the last 10 and the
>     length of the list? *Please* answer "yes" to this! :-)

Yes.

See *print-length*, *print-level*, and *print-lines*.

In your case, I think you want *print-length*

Acording to Paul Graham (p. 395):

"*print-length*

Either nil (the initial value) or a positive integer. If an integer, up to
that many elements of an object will be displayed, the rest being elided.
If nil, there is no limit."

So try

(setf *print-length* 10) or 20, or whatever...

-bruce



Bruce L. Lambert
Department of Pharmacy Administration
University of Illinois at Chicago
Phone:  (312) 996-2411
Fax:    (312) 996-3272
email:  lambertb@uic.edu
WWW:    http://ludwig.pmad.uic.edu/~bruce/