On Fri, 22 Jun 2018 22:17:51 +0200
Zelphir Kaltstahl <zelphirkaltst...@gmail.com> wrote:
[snip]
> ... it returns 0 for end of file (what is the difference between this
> and end of file object?

R6RS states that "The end-of-file object is returned by various I/O
procedures when they reach end of file".  It can be obtained by invoking
the R6RS eof-object procedure and can be queried with the eof-object?
predicate, so '(eof-object? (eof-object))' will evaluate to true.  R6RS
also says "The end-of-file object is not a datum value, and thus has no
external representation".

0 is an integer.  POSIX read() and recv() indicate end-of-file by
unblocking and returning 0.  Subsequent calls to read() or recv() might
return -1 indicating an error, in which case recv! would throw an
exception.

Reply via email to