Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/File-input-output/Oz/file-input-output.oz
Normal file
17
Task/File-input-output/Oz/file-input-output.oz
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
declare
|
||||
class TextFile from Open.file Open.text end
|
||||
|
||||
In = {New TextFile init(name:"input.txt")}
|
||||
Out = {New TextFile init(name:"output.txt" flags:[write text create truncate])}
|
||||
|
||||
proc {CopyAll In Out}
|
||||
case {In getS($)} of false then skip
|
||||
[] Line then
|
||||
{Out putS(Line)}
|
||||
{CopyAll In Out}
|
||||
end
|
||||
end
|
||||
in
|
||||
{CopyAll In Out}
|
||||
{Out close}
|
||||
{In close}
|
||||
Loading…
Add table
Add a link
Reference in a new issue