+ function random(longint): longint

This commit is contained in:
Jonas Maebe 1999-12-01 12:37:13 +00:00
parent 3d1c450db8
commit 7f899914bc
2 changed files with 15 additions and 2 deletions

View File

@ -243,6 +243,12 @@ begin
random := trunc(random()*l); random := trunc(random()*l);
end; end;
function random(l:longint): longint;
begin
random := trunc(random()*l);
end;
Procedure NewSeed; Procedure NewSeed;
begin begin
randseed := randseed mod 1000003; randseed := randseed mod 1000003;
@ -583,7 +589,10 @@ end;
{ {
$Log$ $Log$
Revision 1.73 1999-11-20 12:48:09 jonas Revision 1.74 1999-12-01 12:37:13 jonas
+ function random(longint): longint
Revision 1.73 1999/11/20 12:48:09 jonas
* reinstated old random generator, but modified it so the integer * reinstated old random generator, but modified it so the integer
one now has a much longer period one now has a much longer period

View File

@ -180,6 +180,7 @@ Function Swap (X:Int64):Int64;
{$endif RTLLITE} {$endif RTLLITE}
Function Random(l:cardinal):cardinal; Function Random(l:cardinal):cardinal;
Function Random(l:longint):longint;
Function Random: extended; Function Random: extended;
Procedure Randomize; Procedure Randomize;
@ -399,7 +400,10 @@ const
{ {
$Log$ $Log$
Revision 1.68 1999-11-25 13:34:57 michael Revision 1.69 1999-12-01 12:37:13 jonas
+ function random(longint): longint
Revision 1.68 1999/11/25 13:34:57 michael
+ Added Ansistring setstring call + Added Ansistring setstring call
Revision 1.67 1999/11/20 12:48:09 jonas Revision 1.67 1999/11/20 12:48:09 jonas