Search                        Top                                  Index
HELP RANSEED                                                A.Sloman June 1982

    <integer> -> ranseed

The variable RANSEED has as its value an integer. This number is used to
decide the result of calls of *RANDOM, the 'random' number generator (and
hence *ONEOF, which selects a 'random' element from a list). Each time RANDOM
is called the value of RANSEED is altered so that a subsequent call of RANDOM
with the same argument will produce a different result.

The initial value of RANSEED when POP is started is not predictable, so it is
a good idea while debugging a program that uses RANSEED (e.g. indirectly via
ONEOF), to do something like

    1 -> ranseed;

at the beginning of your program. (This will make it easier to reproduce,
and hence find, intermittent bugs.)

See also
HELP *ONEOF  - to select a 'random' element from a list
HELP *RANDOM - the 'random' number generator