Date : Mon, 23 Oct 2006 22:33:44
From : jgh@... (Jonathan Graham Harston)
Subject: Re: Bugs in OS 1.20 (long)
Greg Cook <debounce@...> wrote:
> Finally, there's a third bug I've noticed in RFS and CFS; on opening an
> empty file with OPENIN, EOF#<handle> will correctly return nonzero, but
> BGET#<handle> will succeed once, returning &FE. Therefore the idiom
No that's correct, documented, and specified behaviour.
"If a file is at EOF, BGET will return &FE with Carry set. A
further BGET without an intervening PTR= or EXT= will generate an
'End of file' error."
> REPEAT:...BGET#fh%...:UNTIL EOF#fh% will malfunction on empty files.
If you want to use that construct, you should use:
IF NOT EOF#chn%:REPEAT ... xxx=BGET#ch% ... UNTIL EOF#ch%
--
J.G.Harston - jgh@... - mdfs.net/User/JGH
United Kingdom Tercentenary : 1707-2007 : http://yr300.org.uk