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


_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog

Reply via email to