VMS Help
CRTL, srandom
*Conan The Librarian
|
Initializes the pseudorandom-number generator random.
Format
#include <stdlib.h>
int srandom (unsigned seed);
seed
An initial seed value.
The srandom function uses the argument as a seed for a new
sequence of pseudorandom numbers to be returned by subsequent
calls to random. This function has virtually the same calling
sequence and initialization properties as the srand function, but
produce sequences that are more random.
The srandom function initializes the current state with the
initial seed value. The srandom function, unlike the srand
function, does not return the old seed because the amount of
state information used is more than a single word.
See also rand, srand, random, setstate, and initstate.
0 Indicates success. Initializes the state seed.
-1 Indicates an error, further specified in the
global errno.