type: function (subr) location: built-in source file: xlfio.c Common LISP compatible: yes supported on: all machines
(write-byte <expr> [ <destination> ] ) <expr> - an integer expression <destination> - an optional destination - must be a file pointer or stream, the default is *standard-output*
The WRITE-BYTE function writes the <expr> as a single byte to the specified <destination>. Only the <expr> byte is written. The <expr> must be an integer expression. 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.
(write-byte 67) ; prints C returns 67 ; (setq fp (open "t" :direction :output)) ; create file (write-byte 65 fp) ; returns 65 (write-byte 66 fp) ; returns 66 (write-byte 10 fp) ; returns 10 (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>.