vinson@linc.cis.upenn.edu (Jack Vinson) (05/30/91)
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 vinson@linc.cis.upenn.edu
rkf@INEL.GOV (Raymond K. Fink) (05/31/91)
In article <43927@netnews.upenn.edu>, vinson@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 rkf@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.