type: function (subr) location: built-in source file: xlfio.c Common LISP compatible: yes supported on: all machines
(write-char <char-expr> [ <destination> ] ) <char-expr> - a character expression <destination> - an optional destination - must be a file pointer or stream, the default is *standard-output*
The WRITE-CHAR function writes the <char-expr> to the specified <destination>. Only the <char-expr> is written. The <char-expr> must be a character expression. The <char-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.
(write-char #\C) ; prints C ; (setq fp (open "t" :direction :output)) ; create file (write-char #\A fp) ; returns #\A (write-char #\B fp) ; returns #\B (write-char #\Newline fp) ; returns #\Newline (close fp) ; returns NIL (read (open "t" :direction :input)) ; returns AB
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>.