[clean-list] Re: eof for console input

isaac gouy igouy@yahoo.com
Wed, 2 Apr 2003 09:25:25 -0800 (PST)


Some file functions can be used with redirected
textfile input from a windows console.
(prog.exe -con < input.txt)

freadc, freadi, freadr all fail at "end-of-file".

So this works fine:

countchars console count
#  (ok, c, console) = freadc console
| not ok = count // "end-of-input"
= countchars console (count+1)

The "buffered" reads (freads, freadsubstring,
freadline) don't seem to be consistent with this
behaviour. They don't recognise "end-of-file".

best wishes, Isaac



__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com