23 lines
544 B
Modula-2
23 lines
544 B
Modula-2
DEFINITION MODULE random;
|
|
(*
|
|
Module: random numbers
|
|
Author: Ceriel J.H. Jacobs
|
|
Version: $Header$
|
|
*)
|
|
|
|
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.
|
|
*)
|
|
|
|
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.
|
|
*)
|
|
|
|
END random.
|