From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653647621953.tru64-unix-managers.marc@archive.invalid> From: Thierry Chich Date: Fri, 18 May 2001 15:02:18 +0000 To: tru64-unix-managers Subject: SUMMARY: rand X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653647621953 Thank you to Stan Horwitz and . 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