Handbook
Glossary
with-output-stream ( stream quot -- )
Factor handbook
»
Input and output
»
Streams
»
Default input and output streams
Prev:
seek-output ( n seek-type -- )
Next:
with-output-stream* ( stream quot -- )
Vocabulary
io
Inputs
stream
an output stream
quot
a
quotation
Outputs
None
Word description
Calls the quotation in a new dynamic scope, with
output-stream
rebound to
stream
. The stream is closed if the quotation returns or throws an error.
See also
with-output-stream*
Definition
USING:
destructors
kernel
;
IN:
io
:
with-output-stream
( stream quot -- )
[
with-output-stream*
]
curry
with-disposal
;
inline