Added and corrected some comments
authorceriel <none@none>
Mon, 13 Jul 1987 13:34:56 +0000 (13:34 +0000)
committerceriel <none@none>
Mon, 13 Jul 1987 13:34:56 +0000 (13:34 +0000)
lang/m2/libm2/LIST
lang/m2/libm2/PascalIO.def

index 17b8c69..622df77 100644 (file)
@@ -15,9 +15,9 @@ Conversion.mod
 Semaphores.mod
 random.mod
 Strings.mod
-Traps.mod
 Arguments.c
 catch.c
+Traps.mod
 LtoUset.e
 StrAss.c
 absd.c
index 5a26b6d..f8a1f28 100644 (file)
@@ -52,13 +52,19 @@ DEFINITION MODULE PascalIO;
   (* Advances the "read pointer" by one character *)
 
   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;
   (* Returns TRUE if the end of the InputText is reached *)
 
   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);
   (* Skip the rest of the current line of the InputText,
@@ -74,9 +80,9 @@ DEFINITION MODULE PascalIO;
 
   PROCEDURE ReadCardinal(InputText: Text; VAR Cardinal: CARDINAL);
   (* 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.
-     Input stops at the character following the integer.
+     Input stops at the character following the cardinal.
   *)
 
   PROCEDURE ReadReal(InputText: Text; VAR Real: REAL);
@@ -87,7 +93,7 @@ DEFINITION MODULE PascalIO;
                [ E [(+|-)] digit {digit} ]
      If no real is read, or when overflow/underflow occurs, a runtime error
      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);
   (* Write boolean "Boolean" to the OutputText, using at least "Width" places,
      blank-padding to the left if needed.
-     Equivalent to WriteString(" TRUE", Width), or
-                  WriteString("FALSE", Width)
+     Equivalent to WriteString(OutputText, " TRUE", Width), or
+                  WriteString(OutputText, "FALSE", Width)
   *)
 
   PROCEDURE WriteString(OutputText: Text;