Rnd
RND
Description
RND returns a single-precision number from a random sequence between 0 and 1. The value is always random: no seed needs to be supplied.
Example
REM RND Example
'RND generates random numbers
Random
Random
Random
SUB Random
DIM Ret, i
RET = ""
FOR i = 1 TO 4
RET = RET&(INT(100 * RND) +1) & " "
NEXT
PRINT "Four random numbers:", RET
END SUB
Output
Four random numbers:6 71 1 19 Four random numbers:33 28 4 51 Four random numbers:33 28 4 51
Related Items