UV 10.0.15 ON Windows 2003 server Largest RND returned is 32767 Hmm....
Looks like the docco under HELP BASIC RND should say "Use the RND function to generate any positive or negative random 16-bit integer or 0" ^^^^^^^^ 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! Mike -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barry Brevik Sent: Thursday, 11 November 2004 08:03 To: U2-users (E-mail) Subject: [U2] [UV] Random number (RND()) help UV 9.6.1.3 on NT. I needed to generate some random numbers between 0 and 370570, and just to check the distribution of numbers, I ran this snippet of code: FOR I = 1 TO 999999 THIS.NUM = RND(370570) NEXT What's odd is that no matter how many times I run this, the distribution of numbers is always completely in the lower 10% of the range (approx). In other words, there are never any numbers generated higher than ~ 33,000. Am I doing something stupidly wrong? Barry ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/ The information contained in this Internet Email message is intended for the addressee only and may contain privileged information, but not necessarily the official views or opinions of the New Zealand Defence Force. If you are not the intended recipient you must not use, disclose, copy or distribute this message or the information in it. If you have received this message in error, please Email or telephone the sender immediately. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/
