type: function (subr) location: built-in source file: xlfio.c and xlprin.c Common LISP compatible: yes supported on: all machines
(print <expr> [ <destination> ] ) <expr> - an expression <destination> - an optional destination - must be a file pointer or stream, the default is *standard-output*
The PRINT function prints the <expr> to the specified <destination>. The <expr> is printed followed by a new-line. If <expr> is a string, it will be printed with quotes around the string. The <expr> is returned as the result. The <destination> may be a file pointer or a stream. If there is no <destination>, *STANDARD-OUTPUT* is the default.
(print 'a) ; prints A with <NL> (print '(a b)) ; prints (A B) with <NL> (print 99) ; prints 99 with <NL> (print "hi") ; prints "hi" with <NL> ; (setq f (open "f" :direction :output)) ; create file (print "hi" f) ; returns "hi" (print 727 f) ; returns 727 (print "ho" f) ; returns "ho" (close f) ; file contains "hi"<NL> ; 727<NL> ; "ho"<NL>
COMMON LISP COMPATIBILITY: Common LISP specifies that print operations 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>.