Ints.mesa
Last Edited by: Arnon, June 10, 1985 4:19:22 pm PDT
DIRECTORY
Rope,
Basics,
IO,
AlgebraClasses,
Points;
Ints: CEDAR DEFINITIONS
= BEGIN OPEN AC: AlgebraClasses, PTS: Points;
Types and Variables
Int: TYPE = REF IntRep;
IntRep:
TYPE =
RECORD [
val: INT
];
IntPoint: TYPE = PTS.Point;
Ints: AC.Structure;
I/O and Conversion
Read:
PROC [in:
IO.
STREAM]
RETURNS [out: Int];
FromRope:
PROC [in: Rope.
ROPE]
RETURNS [out: Int];
ToRope:
PROC [in: Int]
RETURNS [out: Rope.
ROPE];
Write: PROC [stream: IO.STREAM, in: Int];
FromINT: PROC [int: INT] RETURNS [Int];
ToINT: PROC [int: Int] RETURNS [INT];
Arithmetic
Add:
PROC [firstArg, secondArg: Int]
RETURNS [result: Int];
Negate:
PROC [arg: Int]
RETURNS [result: Int];
Subtract:
PROC [firstArg, secondArg: Int]
RETURNS [result: Int];
Multiply:
PROC [firstArg, secondArg: Int]
RETURNS [result: Int];
Remainder:
PROC [firstArg, secondArg: Int]
RETURNS [result: Int];
Gcd:
PROC [m, n: Int]
RETURNS [gcd: Int];
Comparison
Sign:
PROC [arg: Int]
RETURNS [Basics.Comparison];
Abs:
PROC [arg: Int]
RETURNS [result: Int];
Compare:
PROC [firstArg, secondArg: Int]
RETURNS [Basics.Comparison];
Equal: PROC [firstArg, secondArg: Int] RETURNS [BOOL];
END.