Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Input-loop/NetRexx/input-loop-1.netrexx
Normal file
21
Task/Input-loop/NetRexx/input-loop-1.netrexx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
/* 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
|
||||
20
Task/Input-loop/NetRexx/input-loop-2.netrexx
Normal file
20
Task/Input-loop/NetRexx/input-loop-2.netrexx
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols nobinary
|
||||
|
||||
-- Read from default input stream (console) until end of data
|
||||
lines = ''
|
||||
lines[0] = 0
|
||||
|
||||
inScanner = Scanner(System.in)
|
||||
loop l_ = 1 while inScanner.hasNext()
|
||||
inLine = inScanner.nextLine()
|
||||
lines[0] = l_
|
||||
lines[l_] = inLine
|
||||
end l_
|
||||
inScanner.close()
|
||||
|
||||
loop l_ = 1 to lines[0]
|
||||
say l_.right(4)':' lines[l_]
|
||||
end l_
|
||||
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue