Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Copy-stdin-to-stdout/Draco/copy-stdin-to-stdout.draco
Normal file
22
Task/Copy-stdin-to-stdout/Draco/copy-stdin-to-stdout.draco
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
\util.g
|
||||
|
||||
proc nonrec main() void:
|
||||
char c;
|
||||
while
|
||||
/* I/O is line-oriented, so first read characters
|
||||
* from the current line while that is possible */
|
||||
while read(c) do write(c) od;
|
||||
case ioerror()
|
||||
/* Then once it fails, if the line is empty,
|
||||
* try to go to the next line. */
|
||||
incase CH_MISSING:
|
||||
readln();
|
||||
writeln();
|
||||
true
|
||||
/* If it failed for another reason (which will be
|
||||
* EOF here), stop. */
|
||||
default:
|
||||
false
|
||||
esac
|
||||
do od
|
||||
corp
|
||||
Loading…
Add table
Add a link
Reference in a new issue