latest changes to PascalIO: Reset and Rewrite have their parameters switched
This commit is contained in:
parent
9d66bc3258
commit
74ea5e0bd7
2 changed files with 4 additions and 4 deletions
|
@ -16,14 +16,14 @@ DEFINITION MODULE PascalIO;
|
||||||
*)
|
*)
|
||||||
VAR Notext: Text; (* Initialize your Text variables with this *)
|
VAR Notext: Text; (* Initialize your Text variables with this *)
|
||||||
|
|
||||||
PROCEDURE Reset(Filename: ARRAY OF CHAR; VAR InputText: Text);
|
PROCEDURE Reset(VAR InputText: Text; Filename: ARRAY OF CHAR);
|
||||||
(* When InputText indicates an open textfile, it is first flushed
|
(* When InputText indicates an open textfile, it is first flushed
|
||||||
and closed. Then, the file indicated by "Filename" is opened for reading.
|
and closed. Then, the file indicated by "Filename" is opened for reading.
|
||||||
If this fails, a runtime error results. Otherwise, InputText is
|
If this fails, a runtime error results. Otherwise, InputText is
|
||||||
associated with the new input file.
|
associated with the new input file.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
PROCEDURE Rewrite(Filename: ARRAY OF CHAR; VAR OutputText: Text);
|
PROCEDURE Rewrite(VAR OutputText: Text; Filename: ARRAY OF CHAR);
|
||||||
(* When OutputText indicates an open textfile, it is first flushed
|
(* When OutputText indicates an open textfile, it is first flushed
|
||||||
and closed. Then, the file indicated by "Filename" is opened for writing.
|
and closed. Then, the file indicated by "Filename" is opened for writing.
|
||||||
If this fails, a runtime error results. Otherwise, OutputText is
|
If this fails, a runtime error results. Otherwise, OutputText is
|
||||||
|
|
|
@ -30,7 +30,7 @@ IMPLEMENTATION MODULE PascalIO;
|
||||||
VAR ibuf, obuf: IOBuf;
|
VAR ibuf, obuf: IOBuf;
|
||||||
head: Text;
|
head: Text;
|
||||||
|
|
||||||
PROCEDURE Reset(Filename: ARRAY OF CHAR; VAR InputText: Text);
|
PROCEDURE Reset(VAR InputText: Text; Filename: ARRAY OF CHAR);
|
||||||
BEGIN
|
BEGIN
|
||||||
doclose(InputText);
|
doclose(InputText);
|
||||||
getstruct(InputText);
|
getstruct(InputText);
|
||||||
|
@ -48,7 +48,7 @@ IMPLEMENTATION MODULE PascalIO;
|
||||||
END;
|
END;
|
||||||
END Reset;
|
END Reset;
|
||||||
|
|
||||||
PROCEDURE Rewrite(Filename: ARRAY OF CHAR; VAR OutputText: Text);
|
PROCEDURE Rewrite(VAR OutputText: Text; Filename: ARRAY OF CHAR);
|
||||||
BEGIN
|
BEGIN
|
||||||
doclose(OutputText);
|
doclose(OutputText);
|
||||||
getstruct(OutputText);
|
getstruct(OutputText);
|
||||||
|
|
Loading…
Reference in a new issue