An Int32.T
is a 32-bit integer whether compiled on 32-bit or
64-bit machines. This interface can be used to instantiate
generic interfaces and modules such as Table
and List
.
INTERFACEInt32 ; IMPORT Word; TYPE T = BITS 32 FOR [ -16_7fffffff-1 .. 16_7fffffff ]; CONST Brand = "Int32"; 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 Int32.