The rnd() function generates a random number.
rnd(num.exp)
num.exp | Specifies the maximum number minus one from which the rnd() function creates a random number. The minimum number is always 0. the maximum value allowed is 32,000. |
The rnd() function in this example generates a random number between 1 and 8. 1 is added to the result to ensure that the increment is never zero.
increment = rnd(8) + 1