Handbook
Glossary
with-stream* ( stream quot -- )
Factor handbook
»
Input and output
»
Duplex streams
Prev:
with-stream ( stream quot -- )
Vocabulary
io
.
streams
.
duplex
Inputs
stream
a
duplex-stream
quot
a
quotation
Outputs
None
Word description
Calls the quotation in a new dynamic scope, with both
input-stream
and
output-stream
rebound to
stream
, which must be a duplex stream.
Notes
This word does not close the stream. Compare with
with-stream
.
Definition
USING:
io
kernel
;
IN:
io.streams.duplex
:
with-stream*
( stream quot -- )
[
>duplex-stream<
]
dip
with-streams*
;
inline