Jul 9, 2003 #1 BDW1969 IS-IT--Management Aug 29, 2002 43 US Does anyone have a code sample for a random number generator? It would be most useful.
Jul 9, 2003 1 #2 MDXer Technical User Oct 19, 2002 1,982 US I use the following I set a lower and Upper value and the return falls within the range of the two. Public Sub RandomData() Dim RandomValue as Integer RandomValue = Int((UpperBound - LowerBound + 1) * Rnd() + LowerBound) End Sup "Shoot Me! Shoot Me NOW!!!" - Daffy Duck Upvote 0 Downvote
I use the following I set a lower and Upper value and the return falls within the range of the two. Public Sub RandomData() Dim RandomValue as Integer RandomValue = Int((UpperBound - LowerBound + 1) * Rnd() + LowerBound) End Sup "Shoot Me! Shoot Me NOW!!!" - Daffy Duck
Jul 9, 2003 Thread starter #3 BDW1969 IS-IT--Management Aug 29, 2002 43 US Thanks for the quikck response Upvote 0 Downvote
Jul 9, 2003 #4 AP81 Programmer Apr 11, 2003 740 AU How about this: Dim GeneratorRandom as new Random Dim intNum as integer 'generate a random number between 1 and 100 intNum = GeneratorRandom.Next(1,100) Upvote 0 Downvote
How about this: Dim GeneratorRandom as new Random Dim intNum as integer 'generate a random number between 1 and 100 intNum = GeneratorRandom.Next(1,100)
Jul 10, 2003 #5 chiph Programmer Jun 9, 1999 9,878 US Try http://www.lavarnd.com, which has C and Perl source for generating random numbers from a CCD camera. They used to use a LavaLamp for this. Chip H. Upvote 0 Downvote
Try http://www.lavarnd.com, which has C and Perl source for generating random numbers from a CCD camera. They used to use a LavaLamp for this. Chip H.