AW: Looking for some random-functions ...
Thu, 18 Sep 1997 22:00:06 +-200
Christian Bockermann wrote:
> My actual problem is that I don't find any procedures of functions to get
> randomized numbers. I tried "randomize" and "random(n)" as in Turbo Pascal,
> but it didn't work. :-)
> Is there any unit perhaps, which includes such functions in GPC ? Is there
> perhaps something like the "CRT"-unit ?
You can use the following external function declaration:
FUNCTION Rand : Integer; C;
and do the following example:
FOR i := 1 TO 10 DO WriteLn(Rand);
Alternatively, there is a random number generator unit called "Rand" written by
Frank Heckenbach (heckenb@mi.uni-erlangen.de).
To Frank: Would you post your unit again, please? Im interested, too.
Achim
Achim Kalwa (achim.kalwa@do.netsurf.de)
HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada -
Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es