RosettaCodeData/Task/Input-loop/Forth/input-loop.fth

7 lines
176 B
Forth

4096 constant max-line
: read-lines
begin stdin pad max-line read-line throw
while pad swap \ addr len is the line of data, excluding newline
2drop
repeat ;