[vcf-midatlantic] Random numbers

Evan Koblentz evan at vcfed.org
Fri Apr 7 23:23:49 EDT 2017


> The +1 was there so you don't get 0.  You wanted a number in the range 1-38.  Without +1 it's in the range 0-37.
>
> There's no earthly reason I can think of that you'd just get even numbers with the +1 and not without -- but if you are getting both even and odd numbers without +1, you can just work around whatever it is by just adding another line right after it to increment it:
>
> 90 R=INT(RND(1)*38)
> 91 R=R+1
> 92 REM NOW R IS BETWEEN 1 AND 38 INCLUSIVE

Oh, okay.

Added the 1 back. Now it works.

LOL swear I'm not making this up.



More information about the vcf-midatlantic mailing list