Date: Sun, 10 Aug 1997 21:38:32 -0400 (EDT) From: Jude DaShiell Sender: jdashiel AT eagle1 DOT eaglenet DOT com To: Peter Steiner

Cc: djgpp AT delorie DOT com Subject: Re: Newbie Question: Random Numbers In-Reply-To: <5sckav$i2o$5@news01.btx.dtag.de> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Although pseudorandom numbers are all that's possible on a computer the quality of them can be improved by choice of seeds. Under struct time, there's a component that shows milliseconds of time since midnight. Using that as a seed value repeatedly and randomly likely will help. The first number taken off the milliseconds value provided it's not zero could be used as a loop counter. The loop is entered. The random function is seeded; the rest of the program happens that uses the random number including number generation, the loop is decremented, the loop starts again. Actually a nested loop with number of random numbers required needs to surround the above loop. That loop is decremented with each random number generated and tested against the quantity of numbers required. Therefore, you no longer have one random factor but two factors are in play. User interaction with the program will provide a third. hth. //eoj jude While anyone can write anything on the internet; noone has the ability nor the right to compel anyone else to read their writing.