Anders Östlund scripsit: > as I read it, the last sentence in the description of (eof-object? obj), > page 57 says that an eof-object will never be returned by (read).
Not quite. It says that an eof-object can never be an object that is readable by `read`. Thus 32 cannot be an eof-object, nor "eof-object", nor (a . b), because all these things are readable. However, an eof-object could be represented by the instances of a particular record type, for example, since there is no way to read record objects. (This is only true for the standard `read`; an extended `read` that can read arbitrary record objects would have to have some other set of objects to serve as eof-objects.) > But, the description of (read) do describe when an eof-object is > returned. That's the whole point of eof-objects: they are returned by `(read)` when an end of file is detected, and they can't be confused with some object that was actually read in. (There is probably no point in an implementation having more than one eof-object, and R6RS actually requires it to be unique. If there are implementations with more than one, I don't know about them, but there is no portable way to check for it either.) -- How they ever reached any conclusion at all <[email protected]> is starkly unknowable to the human mind. http://www.ccil.org/~cowan --"Backstage Lensman", Randall Garrett _______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
