qb45advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
RANDOMIZE Statement Details
◄QuickSCREEN► ◄Details► ◄Example► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
RANDOMIZE Statement Details
Syntax
RANDOMIZE [expression]
If you omit expression, BASIC pauses and asks for a value by printing
Random Number Seed (-32768 to 32767)?
before executing the RANDOMIZE statement.
When you use the argument expression, QuickBASIC uses the value
to initialize the random-number generator.
If the random-number generator is not reseeded, the RND function returns
the same sequence of random numbers each time the program is run. To
change the sequence of random numbers every time the program is run,
place a RANDOMIZE statement at the beginning of the program and change
the argument with each run.
A convenient way to initialize the random-number generator is to use
the TIMER function. Using TIMER ensures a new series of random numbers
each time you use the program.