443
edits
-
Changes
Created page with "<strong>SRAND</strong> ==SYNOPSIS== #include <stdlib.h> void srand(int seed) ==DESCRIPTION== <strong>Srand</strong>() initializes the random number generator a..."
<strong>SRAND</strong>
==SYNOPSIS==
#include <stdlib.h>
void srand(int seed)
==DESCRIPTION==
<strong>Srand</strong>() initializes the random number generator
accessed by <strong>rand</strong>() with the given seed. This provides a
mechanism for varying the starting point of the
pseudo-random sequence yielded by <strong>rand</strong>(). On the z80, a
good place to get a truly random seed is from the
refresh register. Otherwise timing a response from the
console will do.
==SEE ALSO==
rand
==SYNOPSIS==
#include <stdlib.h>
void srand(int seed)
==DESCRIPTION==
<strong>Srand</strong>() initializes the random number generator
accessed by <strong>rand</strong>() with the given seed. This provides a
mechanism for varying the starting point of the
pseudo-random sequence yielded by <strong>rand</strong>(). On the z80, a
good place to get a truly random seed is from the
refresh register. Otherwise timing a response from the
console will do.
==SEE ALSO==
rand