65 lines
2.5 KiB
HTML
65 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 <instream> </tt>
|
||
|
<tt> <eof-error> </tt>
|
||
|
<tt> <eof-value> </tt>
|
||
|
<tt> <recursive> )</tt>
|
||
|
<P>
|
||
|
<b> Required arguments:</b>
|
||
|
none
|
||
|
<P>
|
||
|
<b> Optional arguments:</b>
|
||
|
4
|
||
|
<P>
|
||
|
<tt> <instream> </tt>: an expression which returns an input stream
|
||
|
<tt> <eof-error> </tt>: any Lisp expression
|
||
|
<tt> <eof-value> </tt>: any Lisp expression
|
||
|
<tt> <recursive> </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> <instream> </tt> is
|
||
|
specified, input is taken from the stream rather than standard input. If
|
||
|
<tt> <eof-error> </tt> is specified it controls what happens if an end of file
|
||
|
is encountered in the middle of a ``read.'' If <tt> <eof-error> </tt> is nil,
|
||
|
no error results, and the result of <tt> <eof-value> </tt> is returned by ``read.''
|
||
|
If <tt> <eof-error> </tt> is not NIL, then encountering the end of a file during a
|
||
|
read will cause an error to occur. <tt> <recursive> </tt> controls the kind
|
||
|
of error that is signalled when an end of file is encountered. If
|
||
|
<tt> <recursive> </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>© Colin Allen & Maneesh Dhagat <BR>
|
||
|
March 2007 </I>
|
||
|
</ADDRESS>
|
||
|
</BODY>
|