Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
RND Function (DataBasic) (m618703+rnd_f.htm)
Returns a random number.
RND(expression)
expression is any valid DataBasic expression that evaluates to a positive integer.
RND generates a random number between zero and the number specified by expression minus one.
expression must be a positive number. If a negative number is used, it is converted to the absolute value (the program performs an implicit ABS on the input argument).
Z = RND(11)
Assigns a random number between 0 and 10 (inclusive) to variable Z.
R = 100
Q = 50
B = RND(R+Q+1)
Assigns a random number between 0 and 150 (inclusive) to variable B.
Y = RND(-51)
Assigns a random number between 0 and 50 inclusive to variable Y.