Generates random numbers within a specified range.
function Random(const ARange: Integer): Integer; overload; function Random: Extended; overload;
int Random(const int ARange); Extended Random();
System
In Delphi code, Random returns a random number within the range 0 <= X < Range. If Range is not specified, the result is a real-type random number within the range
0 <= X < 1.
To initialize the random number generator, add a single call Randomize or assign a value to the RandSeed variable before making any calls to Random.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|