I always multiply the random number generated by the system time in my programs
-Dianne


[EMAIL PROTECTED] wrote:

"So, how could you generate random numbers larger than 32K?
Call RND twice, multiply the first number by 32762 and add on the second number? 
Probably lousy mathematics, but it might work!"

Your idea works perfectly.  The mathematics is correct.
You could accomplish the same thing by something like this.
NUM1 = RND(33000)
NUM2 = RND(33000)
RNDNUM = (NUM1"R%4":NUM2"R%4") + 0

thus taking only the 4 rightmost digits of each.
You'd get random numbers from 5 to 8 digits long, and thus in the range 10000 - 
10000000

You could then subtract 10000 if you want the range
0 - 9990000

Will
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to