type: function (subr) location: extension source file: pp.lsp Common LISP compatible: no supported on: all machines
(pp <expr> [ <destination> [ <break-size> ] ] ) <expr> - an expression to be pretty printed <destination> - an optional destination - must be a file pointer or stream, the default is *standard-output* <break-size> - an integer expression - default is 45
The PP 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.) PP will print it like PRINT. If <expr> is a list, it will perform indenting. T is always returned as the result of PP. The <destination> may be a file pointer or a stream. If there is no <destination> (or it is NIL), *STANDARD-OUTPUT* is the default. The <break-size> paramter is used to determine when an expression should be broken into multiple lines. The default <break-size> is 45.
(pp 'a) ; prints A returns T (pp "abcd") ; prints "abcd" returns T (pp '(a (b c))) ; prints (A (B C)) returns T
COMMON LISP COMPATIBILITY: In Common LISP, the PP functionality is provided with the PPRINT function. The PP function was available in previous XLISP releases and is still accessible. It does allow you to specify the length through <break-size>, which is not available in PPRINT.
NOTE: PP is an extension to the XLISP system provided in the PP.LSP file. The default system and INIT.LSP start-up code do not automatically load PP.LSP. You need to specifically LOAD it yourself during your XLISP session. Another alternative is to put the code or a (LOAD "pp") in the INIT.LSP file. The PP.LSP should have come with your XLISP system. If it doesn't, refer to the EXAMPLE PROGRAMS chapter.