Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 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