emacs.d/clones/colinallen.dnsalias.org/lp/node110.html

64 lines
2.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Originally converted to HTML using LaTeX2HTML 95 (Thu Jan 19 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE> read (FUNCTION)</TITLE>
</HEAD>
<BODY>
<meta name="description" value=" read (FUNCTION)">
<meta name="keywords" value="lp">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR>
<A HREF="node-rest.html"><IMG ALIGN=BOTTOM ALT="next" SRC="next_motif.gif"></A>
<A HREF="node72.html"><IMG ALIGN=BOTTOM ALT="up" SRC="up_motif.gif"></A>
<A HREF="node109.html"><IMG ALIGN=BOTTOM ALT="previous" SRC="previous_motif.gif"></A> <BR>
<A HREF="lp.html"><B>Contents</B></A>
<B> Next:</B>
<A HREF="node-rest.html"> rest (FUNCTION)</A>
<B>Up:</B>
<A HREF="node72.html"> Appendix: Selected Lisp </A>
<B> Previous:</B>
<A HREF="node109.html"> or (FUNCTION)</A>
<BR> <HR> <P>
<H1> read (FUNCTION)</H1>
<P>
<b> Format:</b>
<tt> (read &lt;instream&gt; </tt>
<tt> &lt;eof-error&gt; </tt>
<tt> &lt;eof-value&gt; </tt>
<tt> &lt;recursive&gt; )</tt>
<P>
<b> Required arguments:</b>
none
<P>
<b> Optional arguments:</b>
4
<P>
<tt> &lt;instream&gt; </tt>: an expression which returns an input stream
<tt> &lt;eof-error&gt; </tt>: any Lisp expression
<tt> &lt;eof-value&gt; </tt>: any Lisp expression
<tt> &lt;recursive&gt; </tt>: any Lisp expression
<P>
Called with no arguments, read waits for input from the standard input
(usually the keyboard) and returns a Lisp object. If <tt> &lt;instream&gt; </tt> is
specified, input is taken from the stream rather than standard input. If
<tt> &lt;eof-error&gt; </tt> is specified it controls what happens if an end of file
is encountered in the middle of a ``read.'' If <tt> &lt;eof-error&gt; </tt> is nil,
no error results, and the result of <tt> &lt;eof-value&gt; </tt> is returned by ``read.''
If <tt> &lt;eof-error&gt; </tt> is not NIL, then encountering the end of a file during a
read will cause an error to occur. <tt> &lt;recursive&gt; </tt> controls the kind
of error that is signalled when an end of file is encountered. If
<tt> &lt;recursive&gt; </tt> is specified and is not NIL, then the end of file is
reported to have occurred in the middle of reading in an object. If it is
NIL, the the end of file is reported as occurring between objects.
<P>
<b> Examples:</b> See <a href="node58.html">chapter 5</a>.
<P>
<BR> <HR>
<P>
<ADDRESS>
<I>&#169; Colin Allen &amp; Maneesh Dhagat <BR>
March 2007 </I>
</ADDRESS>
</BODY>