66 lines
3.9 KiB
HTML
66 lines
3.9 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>22. Input/Output</TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
<meta name="description" value=" Input/Output">
|
|
<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=tex2html3846 HREF="node187.html"><IMG ALIGN=BOTTOM ALT="next" SRC="icons/next_motif.gif"></A> <A NAME=tex2html3844 HREF="clm.html"><IMG ALIGN=BOTTOM ALT="up" SRC="icons/up_motif.gif"></A> <A NAME=tex2html3838 HREF="node185.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="icons/previous_motif.gif"></A> <A NAME=tex2html3848 HREF="node1.html"><IMG ALIGN=BOTTOM ALT="contents" SRC="icons/contents_motif.gif"></A> <A NAME=tex2html3849 HREF="index.html"><IMG ALIGN=BOTTOM ALT="index" SRC="icons/index_motif.gif"></A> <BR>
|
|
<B> Next:</B> <A NAME=tex2html3847 HREF="node187.html"> Printed Representation of </A>
|
|
<B>Up:</B> <A NAME=tex2html3845 HREF="clm.html">Common Lisp the Language</A>
|
|
<B> Previous:</B> <A NAME=tex2html3839 HREF="node185.html"> Operations on Streams</A>
|
|
<HR> <P>
|
|
<H1><A NAME=SECTION002600000000000000000>22. Input/Output</A></H1>
|
|
<P>
|
|
<A NAME=IO>Common</A>
|
|
Lisp provides a rich set of facilities for performing input/output.
|
|
All input/output operations are performed on streams of various kinds.
|
|
This chapter is devoted to stream data transfer operations.
|
|
Streams are discussed in chapter <A HREF="node182.html#STREAM">21</A>, and
|
|
ways of manipulating files through streams are discussed in
|
|
chapter <A HREF="node202.html#FILES">23</A>.
|
|
<P>
|
|
While there is provision for reading and writing binary data,
|
|
most of the I/O operations in Common Lisp read or write characters.
|
|
There are simple primitives for reading and writing single characters
|
|
or lines of data. The <tt>format</tt> function can perform complex
|
|
formatting of output data, directed by a control string
|
|
in manner similar to a Fortran <tt>FORMAT</tt> statement
|
|
or a PL/I <tt>PUT EDIT</tt> statement. The most useful I/O operations,
|
|
however, read and write printed representations of arbitrary
|
|
Lisp objects.
|
|
<P>
|
|
<HR>
|
|
<UL>
|
|
<LI> <A NAME=tex2html3850 HREF="node187.html#SECTION002610000000000000000"> Printed Representation of Lisp Objects</A>
|
|
<UL>
|
|
<LI> <A NAME=tex2html3851 HREF="node188.html#SECTION002611000000000000000"> What the Read Function Accepts</A>
|
|
<LI> <A NAME=tex2html3852 HREF="node189.html#SECTION002612000000000000000"> Parsing of Numbers and Symbols</A>
|
|
<LI> <A NAME=tex2html3853 HREF="node190.html#SECTION002613000000000000000"> Macro Characters</A>
|
|
<LI> <A NAME=tex2html3854 HREF="node191.html#SECTION002614000000000000000"> Standard Dispatching Macro Character Syntax</A>
|
|
<LI> <A NAME=tex2html3855 HREF="node192.html#SECTION002615000000000000000"> The Readtable</A>
|
|
<LI> <A NAME=tex2html3856 HREF="node193.html#SECTION002616000000000000000"> What the Print Function Produces</A>
|
|
</UL>
|
|
<LI> <A NAME=tex2html3857 HREF="node194.html#SECTION002620000000000000000"> Input Functions</A>
|
|
<UL>
|
|
<LI> <A NAME=tex2html3858 HREF="node195.html#SECTION002621000000000000000"> Input from Character Streams</A>
|
|
<LI> <A NAME=tex2html3859 HREF="node196.html#SECTION002622000000000000000"> Input from Binary Streams</A>
|
|
</UL>
|
|
<LI> <A NAME=tex2html3860 HREF="node197.html#SECTION002630000000000000000"> Output Functions</A>
|
|
<UL>
|
|
<LI> <A NAME=tex2html3861 HREF="node198.html#SECTION002631000000000000000"> Output to Character Streams</A>
|
|
<LI> <A NAME=tex2html3862 HREF="node199.html#SECTION002632000000000000000"> Output to Binary Streams</A>
|
|
<LI> <A NAME=tex2html3863 HREF="node200.html#SECTION002633000000000000000"> Formatted Output to Character Streams</A>
|
|
</UL>
|
|
<LI> <A NAME=tex2html3864 HREF="node201.html#SECTION002640000000000000000"> Querying the User</A>
|
|
</UL>
|
|
<HR>
|
|
<P><ADDRESS>
|
|
AI.Repository@cs.cmu.edu
|
|
</ADDRESS>
|
|
</BODY>
|