RERANDOM

Syntax

RERANDOM number

(RERANDOM)

Explanation

RERANDOM makes RANDOM outputs identical sequences of numbers. Once you use RERANDOM, it will output the same sequence of random numbers as the first time. Its input is the seed to the random number generator. A different seed yields different random numbers. To achieve truly random numbers, use the current time as a seed. When RERANDOM is enclosed in parentheses without an argument, it uses the current times as its seed.

Example

? RERANDOM ((ITEM 1 TIME) * 3600) + ((ITEM 2 TIME) * 60) + (ITEM 3 TIME)

? REPEAT 4 [PR RANDOM 5]

3

2

3

1

?