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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4231869cc877ceb9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-09-26 18:40:03 PST Path: news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!attla2!ip.att.net!attbi_feed3!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail Message-ID: <3F74EA69.2090105@comcast.net> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: random number generation References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.34.139.183 X-Complaints-To: abuse@comcast.net X-Trace: rwcrnsc51.ops.asp.att.net 1064626802 24.34.139.183 (Sat, 27 Sep 2003 01:40:02 GMT) NNTP-Posting-Date: Sat, 27 Sep 2003 01:40:02 GMT Organization: Comcast Online Date: Sat, 27 Sep 2003 01:40:02 GMT Xref: news1.google.com comp.lang.ada:43206 Date: 2003-09-27T01:40:02+00:00 List-Id: Andrew wrote: > any help is appreciated. Another thing. If you don't call Reset for the random number generator, you will get the same sequence of random numbers every time you run the program. This is intentional. (It makes debugging easier.) So once you have gotten far enough along, right after the begin put in Reset(A_Generator); -- or whatever you called your generator. That will set the generator based on the computer's real-time clock, and shouldn't repeat a seed during the next 50 years. (Unless you run your program on two different computers. There are other ways of initializing the generator to be used when you have multiple generators, each running on its own CPU.) -- Robert I. Eachus "Quality is the Buddha. Quality is scientific reality. Quality is the goal of Art. It remains to work these concepts into a practical, down-to-earth context, and for this there is nothing more practical or down-to-earth than what I have been talking about all along...the repair of an old motorcycle." -- from Zen and the Art of Motorcycle Maintenance by Robert Pirsig