var float : Double; float := Random; // Random float in range: 0 <= float < 1 float := 0.1 + float*0.8 // 0.1 <= float < 0.9
To initialize the random number generator, make one call to Randomize or set the RandSeed parameter before calling the Random function for the first time.
Do not do this, generates the same sequence each time the program starts. Note, however, that this sequence is not guaranteed when recompiling for another version of the compiler.
source share