Thank you to Stan Horwitz and <sysadmin_at_astro.su.se>.
I have been a little bit a newbie with this question, since the
answer is in the man page for rand.
static unsigned int next = 1;
int myrand(void)
{
next = next * 1103515245 + 12345;
return ( (next >>16) & RAND_MAX);
}
void mysrand (unsigned int seed)
{
next = seed
}
Regards,
Thierry Chich
Received on Fri May 18 2001 - 15:03:22 NZST