Equinox Online Help - Language Reference - A to Z

Home

Rnd

Applies to
SyntaxRnd([ModulusExpression])
Action[Function] Returns a random number.
ScopeUsable anywhere.
Notes

This function returns a random numeric value in range (0 to ModulusExpression - 1). If you omit ModulusExpression, a 32-bit unsigned integer is returned, giving access to the full Marsaglia-Zaman sequence. Note that if you do omit ModulusExpression, you must still include the brackets.

The value returned can be affected by the RndStart function.

CategoryMaths
See Also Abs, Acos, Asin, Atan, Cos, Deg, Int, Log, Max, Min, MinMax, Rad, RndStart, Round, Sign, Sin, Sqrt, Tan
Example

This example initialises the string Test with random numbers between 0 and 9 and prints it to screen.

number Test

Test = Rnd(10)
print Test