From: Jack Vinson
Subject: how to deal with end of file when reading
Date: 
Message-ID: <43927@netnews.upenn.edu>
Hello fellow lisp hackers,

I am reading data from a file of unspecified length using with-open-file and a
do loop.  Is there a keyword I can specify which will redirect errors?  Right
now I get the expected end of file error.  What do I do?

Thanks

Jack Vinson				······@linc.cis.upenn.edu
From: Raymond K. Fink
Subject: Re: how to deal with end of file when reading
Date: 
Message-ID: <1991May31.153350.5925@inel.gov>
In article <·····@netnews.upenn.edu>, ······@linc.cis.upenn.edu (Jack Vinson) writes:
>I am reading data from a file of unspecified length using with-open-file and a
>do loop.  Is there a keyword I can specify which will redirect errors?  Right
>now I get the expected end of file error.  What do I do?

(read ..) takes optional arguments on what to do about end-of-file errors; 
(read <your-path> nil 'endfile)  will return the symbol 'endfile when eof is
encountered, and you can handle that within your code.  RTFM, as they say :-)

Ray Fink -- Idaho National Engineering Laboratory -- Idaho Falls ID 
	···@inel.gov			208-526-9323
========== long legal disclaimer follows, press n to skip ===========

Neither the United States Government or the Idaho National Engineering
Laboratory or any of their employees, makes any warranty, whatsoever,
implied, or assumes any legal liability or responsibility regarding any
information, disclosed, or represents that its use would not infringe
privately owned rights.  No specific reference constitutes or implies
endorsement, recommendation, or favoring by the United States
Government or the Idaho National Engineering Laboratory.  The views and
opinions expressed herein do not necessarily reflect those of the
United States Government or the Idaho National Engineering Laboratory,
and shall not be used for advertising or product endorsement purposes.