Next: , Previous: SRFI-56 Port extensions, Up: SRFI-56


39.18.2 SRFI-56 I/O extensions

— Scheme Procedure: read-byte [port]

Read a byte from the current input port. Return an integer in the range 0 to 255, or the eof object. Optional arg port specifies the port to read from.

— Scheme Procedure: write-byte n [port]

Write byte n in range 0 to 255 to current output port. Optional arg port specifies the port to write to.

— Scheme Procedure: peek-byte [port]

Return the next byte available from the current input port. Optional arg port specifies a port to check, instead. If no bytes are available, return the eof object.

— Scheme Procedure: byte-ready? [port]

Return #t if reading from the current input port would produce a byte. Optional arg port specifies a port to check, instead.