ADTBasicType

Common procedures for basic types (Integer, Cardinal, Set, Real)

Procedures

Min

PROCEDURE Min* (x, y : Type) : Type;

Max

Return largest of x & y

PROCEDURE Max* (x, y : Type) : Type;

Swap

Swap x & y

PROCEDURE Swap* (VAR x, y : Type);

Compare

Compare left and right.

  • 0 if left = right

  • -1 if left < right

  • +1 if left > right

PROCEDURE Compare* (left-, right-: Type): INTEGER;

Equal

Test if left and right is equal.

PROCEDURE Equal* (left-, right-: Type): BOOLEAN;

Hash

Hash value (splitmix32/64)

PROCEDURE Hash* (src- : Type): LENGTH;