*print-length* and *print-level*

Download Report

Transcript *print-length* and *print-level*

Liquid Common Lisp
On Suns
Getting Lisp to show your result
• Lisp on the Suns is set to abbreviate output:
– It shows you no more than three levels of a list
– It shows you no more than ten items in a level
• This probably isn’t what you want
• These numbers are controlled by variables
that you can set
– A setting of NIL means “no limit”
*print-length*
• USER 1 : 1 > '(a b c d e f g h i j k l m n)
• (A B C D E F G H I J ...)
• USER 2 : 1 > (setq *print-length* nil)
• NIL
• USER 3 : 1 > '(a b c d e f g h i j k l m n)
• (A B C D E F G H I J K L M N)
*print-level*
• USER 4 : 1 > '(a (b (c (d (e)))))
• (A (B (C #)))
• USER 5 : 1 > (setq *print-level* nil)
• NIL
• USER 6 : 1 > '(a (b (c (d (e)))))
• (A (B (C (D (E)))))
The End