The rnd() function generates a random number.
Syntax
rnd(num.exp) |
Parameter(s)
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. |
Example(s)
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 |
See Also
BASIC Functions, Numeric Expressions, precision Statement, Statements and Functions