From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7fc42d2c6a0eedc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-04 06:30:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.stueberl.de!newsfeed.vmunix.org!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: Ada2005 random Date: Fri, 4 Apr 2003 14:30:24 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1049466624 18701 217.17.192.37 (4 Apr 2003 14:30:24 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Fri, 4 Apr 2003 14:30:24 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:35930 Date: 2003-04-04T14:30:24+00:00 List-Id: * Steve wrote: > The following code almost does what you asked for. No. > The problem is that without the delays the selected random number is > always the same. This should lead you to the error. > I think this is because a new generator is created for each call, and the > "seed" value Ack > (based on time) is the same unless I include delays. Nobody says, that the time is included in the seed. And more important: Even if the random seed is generated from the time, the generation of random values from the seed does have completely different statistical properties than generating a seed from the time. Therefore your code is wrong, wrong, and wrong. Don't use it!