Handbook
Glossary
read ( n -- seq )
Factor handbook
»
Input and output
»
Streams
»
Default input and output streams
Prev:
read1 ( -- elt )
Next:
read-into ( buf -- buf-slice more? )
Vocabulary
io
Inputs
n
a non-negative integer
Outputs
seq
a
byte-array
, a
string
, or
f
Word description
Reads
n
elements from
input-stream
. If there is no input available, outputs
f
. If there are less than
n
elements available, outputs a sequence shorter than
n
in length.
Errors
Throws an error if the I/O operation fails.
Definition
USING:
namespaces
;
IN:
io
:
read
( n -- seq )
input-stream
get
stream-read
;
inline