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