Equinox Online Help - Language Reference - A to Z

Home

RndStart

Applies to
SyntaxRndStart [SeedExpression] [, BaseOffsetExpression]
Action[Statement] Changes the values returned by subsequent calls to the Rnd function.
ScopeUsable anywhere
Notes

This statement uses SeedExpression as an optional number generate a new start point for following values returned by Rnd.

BaseOffsetExpression is an optional number that is added to each following value returned by Rnd.

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

Each time you run Equinox and execute these lines, they will print the same number. This is useful if you want repeatable random numbers, for testing for example:

Print rnd
Print rnd

However these will always print different numbers:

RndStart Timer
Print rnd
Print rnd

This example generates a series of numbers between 65 and 90 (the ASCII values for A-Z):

number vCount

RndStart , 65

for vCount = 1 to 10
Print rnd(26)
next