[Lazarus] Randomize
andtag
at at antastudio.com
Tue Dec 30 19:17:10 CET 2008
Put randomize before of repeat
Lv ha scritto:
> Randomize seems to be 1 second dependent on the system clock.
> I cannot remember if this used to be the same in Borland Delphi/Pascal
> The example below shows a 1 second tick sensitivity to random number
> creation.
>
> Am I missing something?
>
>
> uses unix,crt;
> VAR
> dummystring,filename : String;
> randomnumber : Int64;
> hellfreezesover : Boolean;
>
>
>
> BEGIN
> hellfreezesover:=False;
> Repeat
> Randomize;
> randomnumber:=Random(9999999999999999999);
> writeln('randomnumber=',randomnumber);
> Until (hellfreezesover or keypressed);
> END.
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
More information about the Lazarus
mailing list