50 lines
2.5 KiB
HTML
50 lines
2.5 KiB
HTML
![]() |
<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
|
||
|
<!Converted with LaTeX2HTML 0.6.5 (Tue Nov 15 1994) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
|
||
|
<HEAD>
|
||
|
<TITLE>21. Streams</TITLE>
|
||
|
</HEAD>
|
||
|
<BODY>
|
||
|
<meta name="description" value=" Streams">
|
||
|
<meta name="keywords" value="clm">
|
||
|
<meta name="resource-type" value="document">
|
||
|
<meta name="distribution" value="global">
|
||
|
<P>
|
||
|
<b>Common Lisp the Language, 2nd Edition</b>
|
||
|
<BR> <HR><A NAME=tex2html3797 HREF="node183.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html3795 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html3789 HREF="node181.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html3799 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html3800 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
||
|
<B> Next:</B> <A NAME=tex2html3798 HREF="node183.html"> Standard Streams</A>
|
||
|
<B>Up:</B> <A NAME=tex2html3796 HREF="clm.html">Common Lisp the Language</A>
|
||
|
<B> Previous:</B> <A NAME=tex2html3790 HREF="node181.html"> The Top-Level Loop</A>
|
||
|
<HR> <P>
|
||
|
<H1><A NAME=SECTION002500000000000000000>21. Streams</A></H1>
|
||
|
<P>
|
||
|
<A NAME=STREAM>Streams</A>
|
||
|
are objects that serve as sources or sinks of data.
|
||
|
Character streams produce or absorb characters;
|
||
|
binary streams produce or absorb integers.
|
||
|
The normal action of a Common Lisp system is to read characters from
|
||
|
a character input stream, parse the characters as representations
|
||
|
of Common Lisp data objects, evaluate each object (as a form) as it is read, and
|
||
|
print representations of the results of
|
||
|
evaluation to an output character stream.
|
||
|
<P>
|
||
|
Typically streams are connected to files or to an interactive terminal.
|
||
|
Streams, being Lisp objects, serve as the ambassadors of external
|
||
|
devices by which input/output is accomplished.
|
||
|
<P>
|
||
|
A stream, whether a character stream or a binary
|
||
|
stream, may be input-only, output-only, or bidirectional.
|
||
|
What operations may be performed on a stream depends on which of
|
||
|
the six types of stream it is.
|
||
|
<P>
|
||
|
<HR>
|
||
|
<UL>
|
||
|
<LI> <A NAME=tex2html3801 HREF="node183.html#SECTION002510000000000000000"> Standard Streams</A>
|
||
|
<LI> <A NAME=tex2html3802 HREF="node184.html#SECTION002520000000000000000"> Creating New Streams</A>
|
||
|
<LI> <A NAME=tex2html3803 HREF="node185.html#SECTION002530000000000000000"> Operations on Streams</A>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<P><ADDRESS>
|
||
|
AI.Repository@cs.cmu.edu
|
||
|
</ADDRESS>
|
||
|
</BODY>
|