Yep, just checked. RND(1) seems more typical. There are a few basic
dialects listed on my Ahl's simple benchmark page...
Some BASICs used RND(0) to get the previous random
number and RND(1)
to generate a new number. Some used the reverse... Others used
RND(N) to generate a number between 0 and N.
I think most DEC basics used RND(1) to generate a new number (except
for VAX basic, which, IIRC just used a pseudovariable called RND to
generate random numbers).
Eric
On 1/10/06, charlesmorris at
direcway.com <charlesmorris at direcway.com> wrote:
I was playing blackjack (BASIC program) on SIMH
with my OS/8 RL02 image. I noticed that every time I played the game the cards drawn were
identical, both by the dealer and myself! A loop to print RND(0) ten times always shows
the same ten numbers... doesn't sound very random to me :)
Is this an artifact of SIMH, or BASIC? (Will it go away when I run the program on the
real 8/A)?
thanks
Charles