Randomize

The Randomize instruction initializes the random-number generator. (The random-number generator is called by using the RND function.)

Syntax

Randomize ( number )

Remarks

The Number argument is used to initialize the random-number generator by giving it a new seed value. Number can be any valid numeric expression. If Randomize is not used, the RND function returns the same sequence of random numbers every time the program is run. To have the program generate a different random-number sequence each time it is run, use the Randomize statement with the Number argument assigned to a changing variable or expression to initialize the random-number generator with a different value before RND is called.