type: function (subr) location: built-in source file: xlpp.c Common LISP compatible: yes supported on: all machines
(pp <expr> [ <destination> ] ) <expr> - an expression to be pretty printed <destination> - an optional destination - must be a file pointer or stream, the default is *standard-output*
The PPRINT function produces a pretty looking version of the <expr> and prints it to the specified <destination>. If <expr> is an atom (like a string, a symbol, a number, etc.) PPRINT will print it like PRINT. If <expr> is a list, it will perform indenting, as necessary. NIL is always returned as the result of PPRINT. The <destination> may be a file pointer or a stream. If there is no <destination> (or it is NIL), *STANDARD-OUTPUT* is the default.
(pprint 'a) ; prints A returns T (pprint "abcd") ; prints "abcd" returns T ; (pprint '(a-very-long-name (first list) (second list))) ; ; prints (A-VERY-LONG-NAME (FIRST LIST) ; (SECOND LIST))
COMMON LISP COMPATIBILITY: Common LISP specifies that PPRINT with a <destination> of NIL, will go to *STANDARD-OUTPUT*. XLISP does not send the output to *STANDARD-OUTPUT* with a <destination> of NIL. Common LISP also specifies that a <destination> of T will be sent to *TERMINAL-IO*. XLISP does not allow T as a valid argument for <destination>.