[Coco] seeding the random number generator

Arthur Flexser flexser at fiu.edu
Wed May 21 13:37:37 EDT 2014


On Wed, May 21, 2014 at 11:39 AM, Rogelio Perea <os9dude at gmail.com> wrote:

> On Wed, May 21 2014, John Mark Mobley wrote:
>
> How do i seed the random number generator in Disk Extended Color BASIC
> > (DECB)
> >
>
> Enter a X=RND(-TIMER) statement early on the program. Using the timer
> function will allow the seed to be a bit more open to a wider array of
> seeds to set in the random number generation. The 'X' variable is there
> just to have the RND reseed happening.
>

The way I'd put it is that using TIMER means you get a different result
each time the program is run.

Art



More information about the Coco mailing list