Vocabulary
io

Inputs
databinary data or a string
streaman output stream


Outputs
None

Generic word contract
Writes a piece of data to the stream. If the stream performs buffering, output may not be performed immediately; use stream-flush to force output.

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

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

Definition

GENERIC: stream-write ( data stream -- )


Methods







M:: counting-stream stream-write ( data stream -- )
data stream stream>> stream-write stream
[ data length + ] change-out-count drop ;