Site Menu Project Specification Implementation Recommendations Reference Needs Updating Work in Progress Wastebasket Wiki Manual |
Legacy PIMDEFINITION MODULE LegacyPIM; (* Legacy Interface to Deprecated PIM Pervasives and IO Procedures *) PROCEDURE CAP ( ch : CHAR ) : CHAR; (* Returns ASCII.toUpper(ch) *) PROCEDURE FLOAT ( x : INTEGER ) : REAL; (* Returns x :: REAL *) PROCEDURE TRUNC ( x : REAL ) : INTEGER; (* Returns REALMath.trunc(x) :: INTEGER *) PROCEDURE Read ( VAR ch : CHAR ); (* Invokes READ(stdIn, ch) to call CHAR.Read(stdIn, ch) *) PROCEDURE Write ( ch : CHAR ); (* Invokes WRITE(stdOut, ch) to call CHAR.Write(stdOut, ch) *) PROCEDURE ReadString ( VAR s : ARRAY OF CHAR ); (* Invokes READ(stdIn, s) to call ARRAYOFCHAR.Read(stdIn, s) *) PROCEDURE WriteString ( s : ARRAY OF CHAR ); (* Invokes WRITE(stdOut, ch) to call ARRAYOFCHAR.Write(stdOut, s) *) PROCEDURE ReadCard ( VAR x : CARDINAL ); (* Invokes READ(stdIn, x) to call CARDINAL.Read(stdIn, x) *) PROCEDURE WriteCard ( x, n : CARDINAL ); (* Invokes WRITEF(stdOut, ">n", x) to call CARDINAL.WriteF(stdOut, ">n", x) *) PROCEDURE WriteOct ( x, n : CARDINAL ); (* Writes the value of x in base 8 representation to stdOut *) PROCEDURE WriteHex ( x, n : CARDINAL ); (* Invokes WRITEF(stdOut, "H>n", x) to call CARDINAL.WriteF(stdOut, "H>n", x) n is replaced by the textual representation of the value of parameter n *) PROCEDURE ReadInt ( VAR x : INTEGER ); (* Invokes READ(stdIn, x) to call INTEGER.Read(stdIn, x) *) PROCEDURE WriteInt ( x : INTEGER; n : CARDINAL ); (* Invokes WRITEF(stdOut, ">n", x) to call INTEGER.WriteF(stdOut, ">n", x) n is replaced by the textual representation of the value of parameter n *) PROCEDURE ReadWrd ( VAR x : WORD ); (* Invokes READ(stdIn, x) to call WORD.Read(stdIn, x) *) PROCEDURE WriteWrd ( x : WORD ); (* Invokes WRITE(stdOut, x) to call WORD.Write(stdOut, x) *) PROCEDURE ReadReal ( x : REAL ); (* Invokes READ(stdIn, x) to call REAL.Read(stdIn, x) *) PROCEDURE WriteReal ( x : REAL; n : INTEGER ); (* Invokes WRITEF(stdOut, ">n", r) to call REAL.WriteF(stdOut, ">n", r) n is replaced by the textual representation of the value of parameter n *) PROCEDURE WriteFixPt ( x : REAL; n, k : INTEGER ); (* Invokes WRITEF(stdOut, "n.m", r) to call REAL.WriteF(stdIn, "n.m", r) n is replaced by the textual representation of the value of parameter n, m is replaced by the textual representation of k - n - 1 *) PROCEDURE WriteRealOct ( x : REAL ); (* Writes the exponent and significand of x in base 8 representation to stdOut *) END LegacyPIM. |