PUBLIC INTEGER FUNCTION Random (INTEGER min,INTEGER max)
Description
This value returns a random number within the specified range. The size of the range (max-min) may not be larger than 65000. If the randomizer has not been seeded yet, it will automatically be seeded using the current clock value. This is a simple pseudo-random number generator, which is useful for getting simple random numbers but should not be used for cryptographic or security purposes.
Parameters
min
Minimum returned value
max
Maximum returned value
Returns
A random value in the specified range
Example
//Returns a simulation of a throw with two dices
INTEGER dice1 := Random(1,6);
INTEGER dice2 := Random(1,6);
INTEGER twodice := dice1 + dice2;