REF STREAMS                               Titch Le Bek, Rob Duncan, 1986

       COPYRIGHT University of Sussex 1993. All Rights Reserved.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<                             >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<    LISP INPUT AND OUTPUT    >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<           STREAMS           >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<                             >>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

This file  briefly  describes  the functions,  variables  and  constants
documented in Chapter 21  of the standard Common  Lisp guide, which  is:
Common Lisp: The Language (Guy L. Steele, Digital Press, 1984).



-------------------------------------------------
1  A Listing of Functions Variables and Constants
-------------------------------------------------

*debug-io*                                                    [variable]
        The  two-way  stream  to  be  used  for  interactive   debugging
        purposes.


*error-output*                                                [variable]
        The output stream to which error messages should be sent.


*query-io*                                                    [variable]
        The two-way stream to be used for asking questions of the user.


*standard-input*                                              [variable]
        The input stream for the top-level loop and the default for many
        input functions including read and read-char.


*standard-output*                                             [variable]
        The output stream  for the  top-level loop and  the default  for
        many output functions including print and write-char.


*terminal-io*                                                 [variable]
        The two-way stream connected to the user's terminal.


*trace-output*                                                [variable]
        The output stream on which trace prints its output.


(broadcast-stream-streams broadcast-stream)                   [function]
        Returns  the   list  of   output  streams   broadcasted  to   by
        broadcast-stream.


(close stream &key :abort)                                    [function]
        Closes stream so that no further input/output operations may  be
        performed on it. The  :abort parameter if  not nil indicates  an
        abnormal termination of the use of stream.


(concatenated-stream-streams concatenated-stream)             [function]
        Returns the list of input streams from which concatenated-stream
        might still read.


(echo-stream-input-stream echo-stream)                        [function]
(echo-stream-output-stream echo-stream)                       [function]
        These functions  return  (respectively)  the  input  and  output
        streams from which echo-stream was constructed.


(get-output-stream-string string-output-stream)               [function]
        Given a stream  produced by make-string-output-stream  returns a
        string containing all  the characters  output to  the stream  so
        far. Each  call gets  only the  characters since  the last  such
        call.


(input-stream-p stream)                                       [function]
        Returns  true  if  stream  can  handle  input  operations;   nil
        otherwise.


(interactive-stream-p stream)                                 [function]
        Returns t if stream is  interactive (connected to a terminal  or
        Ved file); nil otherwise.


(make-broadcast-stream &rest streams)                         [function]
        Returns a stream that  works only in  the output direction.  The
        set of operations that may be performed on the new stream is the
        intersection of those for the  given streams. If no streams  are
        given then all output to the resulting stream is discarded.


(make-concatenated-stream &rest streams)                      [function]
        Returns a stream that works  only in the input direction.  Input
        is taken  from  the  first  of  the  streams  until  it  reaches
        end-of-file; then that stream is  discarded, and input is  taken
        from the next of the streams and so on. If no streams are  given
        the result  is  a stream  with  no content;  any  input  attempt
        results in end-of-file.


(make-echo-stream input-stream output-stream)                 [function]
        Returns  a  bidirectional  stream  that  gets  its  input   from
        input-stream and sends  its output to  output-stream. All  input
        taken from input-stream is echoed to output-stream.


(make-string-input-stream string &optional start end)         [function]
        Returns  an  input  stream  which  will  supply  in  order   the
        characters from the substring of  string delimited by start  and
        end. After the last character has been supplied, the stream will
        be at end-of-file.


(make-string-output-stream)                                   [function]
        Returns an output  stream that accumulates  all output given  it
        for the benefit of the function get-output-stream-string.


(make-synonym-stream symbol)                                  [function]
        Creates and returns  a "synonym stream".  Operations on the  new
        stream will then  be performed on  the stream that  is then  the
        value of the dynamic variable named  by symbol. If the value  of
        the variable changes or is bound, the synonym stream operates on
        the new stream.


(make-two-way-stream input-stream output-stream)              [function]
        Returns  a  bidirectional  stream  that  gets  its  input   from
        input-stream and sends its output to output-stream.


(open-stream-p stream)                                        [function]
        Returns true if stream is open; nil otherwise.


(output-stream-p stream)                                      [function]
        Returns true if stream can handle output operations.


(stream-external-format stream)                               [function]
        Returns a  specifier  for the  implementation-recognized  scheme
        used for representing characters in the argument stream. See the
        :external-format argument to open.


(streamp object)                                              [function]
        Returns true if object is a stream. nil otherwise.


(synonym-stream-symbol synonym-stream)                        [function]
        Returns the symbol associated with synonym-stream.


(two-way-stream-input-stream two-way-stream)                  [function]
(two-way-stream-output-stream two-way-stream)                 [function]
        These functions  return  (respectively)  the  input  and  output
        streams from which two-way-stream was constructed.


(with-input-from-string (var string {keyword value}*)            [macro]
                            {declaration}* {form}*)
        var  is  bound  to  a  character  input  stream  that   supplies
        successive characters from string. The  result of the last  form
        of the  body  is returned.  The  input stream  is  automatically
        closed on exit. The keyword options are index start end.


(with-open-stream (var stream) {declaration}* {form}*)           [macro]
        stream is evaluated to produce a  stream which is bound to  var.
        The result of evaluating the  last form is returned. The  stream
        is automatically closed on exit.


(with-output-to-string (var [string]) {declaration}* {form}*)    [macro]
        var is bound  to a character  output stream. All  output to  the
        stream is saved in string.  If a particular string is  specified
        it  must  have  a  fill-pointer:  The  output  is  incrementally
        appended to the string. The results of the last form of the body
        are returned and  the output stream  is automatically closed  on
        exit.


--- C.all/lisp/ref/streams
--- Copyright University of Sussex 1993. All rights reserved.
