tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: rand
@ 2001-05-18 15:02 Thierry Chich
  0 siblings, 0 replies; only message in thread
From: Thierry Chich @ 2001-05-18 15:02 UTC (permalink / raw)
  To: tru64-unix-managers


Thank you to  Stan Horwitz and  <sysadmin@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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-18 15:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-18 15:02 SUMMARY: rand Thierry Chich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox