Table of Contents

RANDOMIZE

The RANDOMIZE command seeds the pseudo-random generator with an initial value.

Syntax

RANDOMIZE <value>

The value given must be a LONG number and it will serve as a base for the random sequence.

Example

A typical use case is to seed the randomizer with the result of the TI function:

RANDOMIZE TI()
FOR i AS BYTE = 1 TO 10 : PRINT RND() : NEXT

See also