I just ran this code

on mouseUp
  repeat 1000
    add 1 to x[random(3)]
  end repeat
  put sum(x) into y
  combine x using cr and tab
  put x & cr & cr & y
end mouseUp

and got this:

1       329
2       328
3       328

985


Note that the three numbers don't add up to 1000, but there are no other numbers. ???

Running it again I get:

1       339
2       335
3       338

1012


_More_ than 1000? What the???

Even stranger, making this slight adjustment fixes it:

on mouseUp
  repeat 1000
    put random(3) into z
    add 1 to x[z]
  end repeat
  put sum(x) into y
  combine x using cr and tab
  put x & cr & cr & y
end mouseUp

Anyone know what I'm not seeing?

regards,

Geoff
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to