Added and corrected some comments
This commit is contained in:
parent
6a8547cca0
commit
b93dc94cdb
2 changed files with 14 additions and 8 deletions
|
@ -15,9 +15,9 @@ Conversion.mod
|
||||||
Semaphores.mod
|
Semaphores.mod
|
||||||
random.mod
|
random.mod
|
||||||
Strings.mod
|
Strings.mod
|
||||||
Traps.mod
|
|
||||||
Arguments.c
|
Arguments.c
|
||||||
catch.c
|
catch.c
|
||||||
|
Traps.mod
|
||||||
LtoUset.e
|
LtoUset.e
|
||||||
StrAss.c
|
StrAss.c
|
||||||
absd.c
|
absd.c
|
||||||
|
|
|
@ -52,13 +52,19 @@ DEFINITION MODULE PascalIO;
|
||||||
(* Advances the "read pointer" by one character *)
|
(* Advances the "read pointer" by one character *)
|
||||||
|
|
||||||
PROCEDURE Eoln(InputText: Text): BOOLEAN;
|
PROCEDURE Eoln(InputText: Text): BOOLEAN;
|
||||||
(* Returns TRUE if the next character of the InputText is a linefeed *)
|
(* Returns TRUE if the next character of the InputText is a linefeed.
|
||||||
|
Unlike Pascal however, it does not produce a runtime error when
|
||||||
|
called when Eof(InputText) is TRUE.
|
||||||
|
*)
|
||||||
|
|
||||||
PROCEDURE Eof(InputText: Text): BOOLEAN;
|
PROCEDURE Eof(InputText: Text): BOOLEAN;
|
||||||
(* Returns TRUE if the end of the InputText is reached *)
|
(* Returns TRUE if the end of the InputText is reached *)
|
||||||
|
|
||||||
PROCEDURE ReadChar(InputText: Text; VAR Char: CHAR);
|
PROCEDURE ReadChar(InputText: Text; VAR Char: CHAR);
|
||||||
(* Read a character from the InputText, and leave result in "Char" *)
|
(* Read a character from the InputText, and leave result in "Char".
|
||||||
|
Unlike Pascal, if Eoln(InputText) is true, the newline character
|
||||||
|
is put in "Char".
|
||||||
|
*)
|
||||||
|
|
||||||
PROCEDURE ReadLn(InputText: Text);
|
PROCEDURE ReadLn(InputText: Text);
|
||||||
(* Skip the rest of the current line of the InputText,
|
(* Skip the rest of the current line of the InputText,
|
||||||
|
@ -74,9 +80,9 @@ DEFINITION MODULE PascalIO;
|
||||||
|
|
||||||
PROCEDURE ReadCardinal(InputText: Text; VAR Cardinal: CARDINAL);
|
PROCEDURE ReadCardinal(InputText: Text; VAR Cardinal: CARDINAL);
|
||||||
(* Skip leading blanks, read a cardinal from the InputText, and leave the
|
(* Skip leading blanks, read a cardinal from the InputText, and leave the
|
||||||
result in "card".
|
result in "Cardinal".
|
||||||
If no cardinal is read, or when overflow occurs, a runtime error results.
|
If no cardinal is read, or when overflow occurs, a runtime error results.
|
||||||
Input stops at the character following the integer.
|
Input stops at the character following the cardinal.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
PROCEDURE ReadReal(InputText: Text; VAR Real: REAL);
|
PROCEDURE ReadReal(InputText: Text; VAR Real: REAL);
|
||||||
|
@ -87,7 +93,7 @@ DEFINITION MODULE PascalIO;
|
||||||
[ E [(+|-)] digit {digit} ]
|
[ E [(+|-)] digit {digit} ]
|
||||||
If no real is read, or when overflow/underflow occurs, a runtime error
|
If no real is read, or when overflow/underflow occurs, a runtime error
|
||||||
results.
|
results.
|
||||||
Input stops at the character following the integer.
|
Input stops at the character following the real.
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(***************************************************************************
|
(***************************************************************************
|
||||||
|
@ -118,8 +124,8 @@ DEFINITION MODULE PascalIO;
|
||||||
PROCEDURE WriteBoolean(OutputText: Text; Boolean: BOOLEAN; Width: CARDINAL);
|
PROCEDURE WriteBoolean(OutputText: Text; Boolean: BOOLEAN; Width: CARDINAL);
|
||||||
(* Write boolean "Boolean" to the OutputText, using at least "Width" places,
|
(* Write boolean "Boolean" to the OutputText, using at least "Width" places,
|
||||||
blank-padding to the left if needed.
|
blank-padding to the left if needed.
|
||||||
Equivalent to WriteString(" TRUE", Width), or
|
Equivalent to WriteString(OutputText, " TRUE", Width), or
|
||||||
WriteString("FALSE", Width)
|
WriteString(OutputText, "FALSE", Width)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
PROCEDURE WriteString(OutputText: Text;
|
PROCEDURE WriteString(OutputText: Text;
|
||||||
|
|
Loading…
Add table
Reference in a new issue