Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Input-loop/Oberon-2/input-loop.oberon
Normal file
18
Task/Input-loop/Oberon-2/input-loop.oberon
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
MODULE InputLoop;
|
||||
IMPORT
|
||||
StdChannels,
|
||||
Channel;
|
||||
VAR
|
||||
reader: Channel.Reader;
|
||||
writer: Channel.Writer;
|
||||
c: CHAR;
|
||||
BEGIN
|
||||
reader := StdChannels.stdin.NewReader();
|
||||
writer := StdChannels.stdout.NewWriter();
|
||||
|
||||
reader.ReadByte(c);
|
||||
WHILE reader.res = Channel.done DO
|
||||
writer.WriteByte(c);
|
||||
reader.ReadByte(c)
|
||||
END
|
||||
END InputLoop.
|
||||
Loading…
Add table
Add a link
Reference in a new issue