scsh-users
[Top] [All Lists]

Re: How to test for end of file?

To: back0003@gold.tc.umn.edu
Subject: Re: How to test for end of file?
From: Brian D. Carlstrom <bdc@martigny.ai.mit.edu>
Date: Mon, 15 Jan 96 11:31:51 -0800
Cc: SCSH List <scsh@martigny.ai.mit.edu>
Reply-to: "Brian D. Carlstrom" <bdc@ai.mit.edu>
Olin, 
I couldn't find this in the manual myself. I had to look in scsh.scm.

-bri

>         (if (= temp-line end-of-file)          ;; How to test for EOF?

rolex:~ $ scsh
Scsh 0.4
> (read-line (open-input-file "/dev/null"))
'#{End-of-file}
> (eof-object? ##)
#t
> 

<Prev in Thread] Current Thread [Next in Thread>