Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 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