BasicTimeExtrasImpl.mesa
Copyright © 1992 by Xerox Corporation. All rights reserved.
Bier, February 5, 1993 12:12 pm PST
Contents: Operations on the ExtendedGMT type defined in BasicTime.mesa.
DIRECTORY
Basics, BasicTime, BasicTimeExtras;
BasicTimeExtrasImpl:
CEDAR
PROGRAM
IMPORTS Basics
EXPORTS BasicTime, BasicTimeExtras = BEGIN
GMT: PUBLIC TYPE = INT;
ExtendedGMT: TYPE = BasicTime.ExtendedGMT;
ECompare:
PUBLIC
PROC [a, b: ExtendedGMT]
RETURNS [Basics.Comparison] = {
agmt: GMT ¬ a.gmt;
bgmt: GMT ¬ b.gmt;
SELECT
TRUE
FROM
agmt < bgmt => RETURN [less];
agmt > bgmt => RETURN [greater];
a.gmt = b.gmt => RETURN Basics.CompareInt[a.usecs, b.usecs];
ENDCASE => ERROR
};
ESub: PUBLIC PROC [a, b: ExtendedGMT] RETURNS [ExtendedGMT] = {
};
EAdd: PUBLIC PROC [a, b: ExtendedGMT] RETURNS [ExtendedGMT] = {
};
EUpdate: PUBLIC PROC [a, b: ExtendedGMT] RETURNS [ExtendedGMT] = {
};
GMTToEGMT: PUBLIC PROC [time: GMT] RETURNS [etime: ExtendedGMT] = {
};
END.