Randomize Command

Purpose

Seeds the random number generators.

Syntax

Randomize [n]

Description

Randomize [n] seeds the random number generators with the value n. If the random number generator is seeded several times with the same n <> 0, the same sequence of "random numbers" is generated.

Every time a program is run the random number generators are seeded with a "random" number. Therefore, if Randomize is not used, each program run will result in Rnd, Random, or Rand producing different random numbers.

Randomize (without parameters) or Randomize 0 seeds the random number generator with the value of Timer, a random number just like when a program starts up.

See Also

Rnd, Rand, Random

{Created by Sjouke Hamstra; Last updated: 12/05/14 by James Gaite}