stream-read1 ( stream -- elt )
Factor handbook » Input and output » Streams » Stream protocol

Prev:Binary and text streams
Next:stream-read-unsafe ( n buf stream -- count )


Vocabulary
io

Inputs
streaman input stream


Outputs
eltan element or f


Generic word contract
Reads an element from the stream. Outputs f on stream exhaustion.

Notes
Most code only works on one stream at a time and should instead use read1; see Default input and output streams.

Errors
Throws an error if the I/O operation fails.

Definition

GENERIC: stream-read1 ( stream -- elt )


Methods