System.Randomize
Delphi
procedure Randomize;
C++
extern DELPHI_PACKAGE void __fastcall Randomize(void);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.pas System.hpp |
System | System |
Description
Initializes the random number generator with a random value.
Randomize initializes the built-in random number generator with a random value (obtained from the system clock). The random number generator should be initialized by making a call to Randomize, or by assigning a value to RandSeed.
Do not combine the call to Randomize in a loop with calls to the Random function. Typically, Randomize is called only once, before all calls to Random.
See Also