1987-05-13 14:36:45 +00:00
|
|
|
DEFINITION MODULE random;
|
1988-02-19 15:54:01 +00:00
|
|
|
(*
|
|
|
|
Module: random numbers
|
|
|
|
Author: Ceriel J.H. Jacobs
|
1994-06-24 14:02:31 +00:00
|
|
|
Version: $Id$
|
1988-02-19 15:54:01 +00:00
|
|
|
*)
|
1987-05-13 14:36:45 +00:00
|
|
|
|
|
|
|
PROCEDURE Random(): CARDINAL;
|
|
|
|
(* Return a random CARDINAL
|
|
|
|
*)
|
|
|
|
|
|
|
|
PROCEDURE Uniform (lwb, upb: CARDINAL): CARDINAL;
|
|
|
|
(* Return CARDINALs, uniformly distributed between "lwb" and "upb".
|
|
|
|
"lwb" must be smaller than "upb", or "lwb" is returned.
|
|
|
|
*)
|
|
|
|
|
1988-02-19 15:54:01 +00:00
|
|
|
PROCEDURE StartSeed(seed: CARDINAL);
|
|
|
|
(* Initialize the generator. You don't have to call this procedure, unless
|
|
|
|
you don't want the system to pick a starting value for itself.
|
|
|
|
*)
|
|
|
|
|
1987-05-13 14:36:45 +00:00
|
|
|
END random.
|