[Coco] Re: 6809 example

William Astle lost at l-w.net
Sat Jan 17 13:02:53 EST 2004


On Sat, 17 Jan 2004, Robert Gault wrote:

> Also if you want the random numbers to range 0-9, change the random
> number generater to RND(0)*10+48. I was thinking RND gave inclusive
> values but it clearly is exclusive of the high endpoint.

Why not RND(10)-1? The whole RND(0)... formula is unnecessary in Color
Basic if you need an integer. RND(0) returns a floating point number
between 0 and 1. I believe RND(x) where x > 0 gives a number from 1 to x
inclusive. RND(-x) reseeds the pseudo random number generator.

-- 
William Astle
finger lost at l-w.net for further information

Geek Code V3.12: GCS/M/S d- s+:+ !a C++ UL++++$ P++ L+++ !E W++ !N w--- !O
!M PS PE V-- Y+ PGP t+@ 5++ X !R tv+@ b+++@ !DI D? G e++ h+ y?



More information about the Coco mailing list