Re: Documentation cut and paste error for byte input?

"Michał Bieliński" <[email protected]>
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
Dnia 23 Listopada 2013, 15:15, So, Sean Charles napisał
> 8.13  Byte input/output
>
>
> These built-in predicates enable a single byte to be input from and output
> to a binary stream. -1 is returned to indicate the end-of-file.
>
>
> How do I know the difference between 0xFF and the end of file then?
> I looked at 8.12 and it looks like it might just be a cut and paste
> thing going in there.

Note that the above says byte input, not byte return type.  I think it is
the same as getc() in C.  It reads bytes but returns larger integer to
facilitate signaling end of file.

Under these assumptions 0xFF would be 255, not -1.

-- 
Michał Bieliński
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.