DEFINITION MODULE clcg4;

CONST
   Maxgen = 100; 

TYPE
   Gen = [0..Maxgen];

   SeedType = (InitialSeed, LastSeed, NewSeed);


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


PROCEDURE WriteState
   ( g : Gen
   );


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


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


PROCEDURE SetInitialSeed
   ( S1, S2, S3, S4 : LONGINT
   );


PROCEDURE Init 
   (v, w : LONGINT
   );


PROCEDURE GenVal
   ( g : Gen
   ) : LONGREAL;


PROCEDURE InitDefault;


END clcg4.


