Next: Writer, Up: Reader & writer
Scheme48's reader facility is exported by the reading
structure. The read
binding thereby exported is identical to
that of the scheme
structure, which is the binding that R5RS
specifies under the name read
.
Reads a single S-expression from port, whose default value is the current input port. If the end of the stream is encountered before the beginning of an S-expression,
read
will return an EOF object. It will signal a read error if text read from port does not constitute a complete, well-formed S-expression.
Defines a sharp/pound/hash/octothorpe (
#
) reader macro. The next time the reader is invoked, if it encounters an octothorpe/sharp followed by char, it applies proc to char and the input port being read from. Char is not consumed in the input port. If char is alphabetic, it should be lowercase; otherwise the reader will not recognize it, since the reader converts the character following octothorpes to lowercase.