Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
19
Task/File-input-output/Modula-3/file-input-output.mod3
Normal file
19
Task/File-input-output/Modula-3/file-input-output.mod3
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
MODULE FileIO EXPORTS Main;
|
||||
|
||||
IMPORT IO, Rd, Wr;
|
||||
|
||||
<*FATAL ANY*>
|
||||
|
||||
VAR
|
||||
infile: Rd.T;
|
||||
outfile: Wr.T;
|
||||
txt: TEXT;
|
||||
|
||||
BEGIN
|
||||
infile := IO.OpenRead("input.txt");
|
||||
outfile := IO.OpenWrite("output.txt");
|
||||
txt := Rd.GetText(infile, LAST(CARDINAL));
|
||||
Wr.PutText(outfile, txt);
|
||||
Rd.Close(infile);
|
||||
Wr.Close(outfile);
|
||||
END FileIO.
|
||||
Loading…
Add table
Add a link
Reference in a new issue