An Integer.T
is an INTEGER
. This interface is intended to be
used to instantiate generic interfaces and modules such as Table
and List
.
INTERFACEInteger ; IMPORT Word; TYPE T = INTEGER; CONST Brand = "Integer"; PROCEDURE Equal(a, b: T): BOOLEAN;
Return a = b
.
PROCEDURE Hash(a: T): Word.T;
Return a
.
PROCEDURE Compare(a, b: T): [-1..1];
Return-1
ifa < b
,0
ifa = b
, or+1
ifa > b
.
END Integer.