NAME

randomize - reseed the random number generator

SYNOPSIS

randomize [Seed]

DESCRIPTION

Randomize changes the seed used by the random number generator.  If an argument is given, it is used as the value of the new seed.  If no argument is given, the user is prompted for the value of the new seed.  Seed values must be integer expressions in the range -32768 to 32767. 

A randomize statement at the beginning of the program will change the seed with each run.  The rnd function will return the same sequence of random numbers each time the program is run if the random number generator is not reseeded. 

EXAMPLE

The program
	randomize
	for i = 1 to 3
		print rnd(i);
	next i
would prompt
	Random Number Seed (-32768 to 32767)?
The value with which you respond will determine the particular sequence of random numbers produced by subsequent rnd function calls. 

SEE ALSO

rnd

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber