DEFINITION MODULE RandCard;

	(********************************************************)
	(*							*)
	(*	   	Random number generator			*)
	(*							*)
	(*  Programmer:		P. Moylan			*)
	(*  Last edited:	12 February 1993		*)
	(*  Status:		OK				*)
	(*							*)
	(********************************************************)

CONST modulus = 2147483647;	(*  2^31 - 1  *)

VAR seed: LONGCARD;	(*   visible in case you want to re-randomize	*)

PROCEDURE RandCardinal (): LONGCARD;

    (* Returns a random number in the range [1..modulus-1], with a	*)
    (* uniform distribution over that range.				*)

END RandCard.
