srand function "seeds" the pseudo-random number
generator with an integer
$seed, which determines what sequence
of pseudo-random numbers will be returned in future calls to
randpick. This can be used to help ensure the
sequence is different each run (with a random seed), or to generate
the same sequence on a subsequent run (with the same seed) i.e. for
reproducibly random results.
If an empty string is given, a semi-random seed is created; this is
also how the generator is seeded if
srand is not called.
srand function returns the previous seed value.
<WHILE $loop lt 10>
<rand 0 10> $ret
The output will always produce the same sequence of "random" numbers on a given platform.
srand function was added Mar. 16 2000.
The reproducibility and/or randomness of numbers is system-dependent.