RatIntervals.mesa
Last Edited by: Arnon, June 10, 1985 4:19:22 pm PDT
DIRECTORY
Rope,
Basics,
IO,
BigRats;
RatIntervals: CEDAR DEFINITIONS
= BEGIN OPEN RN: BigRats;
***** Data Structure *****
RatInterval: TYPE = REF RatIntervalRec;
RatIntervalRec:
TYPE =
RECORD [
leftEndPoint, rightEndPoint: RN.BigRat
]; -- assumed that leftEndPoint <= rightEndPoint.
ReadRatInterval:
PROC [in:
IO.
STREAM]
RETURNS [out: RatInterval];
RatIntervalFromRope:
PROC [in: Rope.
ROPE]
RETURNS [out: RatInterval];
RatIntervalToRope:
PROC [in: RatInterval, showDenomOne:
BOOL ←
FALSE]
RETURNS [Rope.
ROPE];
WriteRatInterval:
PROC [in: RatInterval, out:
IO.
STREAM, showDenomOne:
BOOL ←
FALSE];
END.