RosettaCodeData/Task/Input-loop/NetRexx/input-loop-1.netrexx

22 lines
479 B
Plaintext

/* NetRexx */
options replace format comments java crossref symbols nobinary
-- Read from default input stream (console) until end of data
lines = ''
lines[0] = 0
lineNo = 0
loop label ioloop forever
inLine = ask
if inLine = null then leave ioloop -- stop on EOF (Try Ctrl-D on UNIX-like systems or Ctrl-Z on Windows)
lineNo = lineNo + 1
lines[0] = lineNo
lines[lineNo] = inLine
end ioloop
loop l_ = 1 to lines[0]
say l_.right(4)':' lines[l_]
end l_
return