[vcf-midatlantic] Random numbers

Dean Notarnicola dnotarnicola at gmail.com
Sat Apr 8 09:37:16 EDT 2017

+1 was there to assure that INT never returns 0, as that is not in your
desired range.

On Sat, Apr 8, 2017 at 9:25 AM Evan Koblentz via vcf-midatlantic <
vcf-midatlantic at lists.vintagecomputerfederation.org> wrote:

> If you just generate a bunch of random numbers without doing anything to
> the number (like INT() or multiplying it) what do you get?

Applesoft generates a decimal value between 0 and 1 if you don't INT or
multiply it. You can't do RND(number bigger than 1); it's a syntax error.

If I remove the INT (which rounds down to .0) but keep the
multiplication, then I get evens and odds.

I added the INT back because I need whole numbers. But I left out the
+1. Now it works as R=INT(RND(1)*38) .... thinking aloud, I have no idea
why the +1 was there! :)

More information about the vcf-midatlantic mailing list