

DEFINITION MODULE RAND;

TYPE
   Gen = [1..32];

   SeedType = (InitialSeed, LastSeed, NewSeed);

PROCEDURE InitGenerator
   ( g : Gen;
     Where : SeedType
   );


PROCEDURE SetAntithetic
   ( g : Gen;
     B : BOOLEAN
   );


PROCEDURE SetInitialSeed
   ( S1, S2 : LONGINT
   );


PROCEDURE SetSeed
   ( g : Gen;
     S1, S2 : LONGINT
   );


PROCEDURE GetState
   ( g : Gen;
     VAR S1, S2 : LONGINT
   );


PROCEDURE AdvanceState
   ( g : Gen;
     k : LONGCARD
   );


PROCEDURE Random
   ( g : Gen
   ) : LONGCARD ;


PROCEDURE Uniform01
   ( g : Gen
   ) : LONGREAL;


END RAND.
