Getting a Random Seed for the Random Number Generator
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Fri Dec 8 08:43:53 EST 2006
Hi Dave,
Does setting the randomseed when appropriate would be enough for your
needs?
Use the randomSeed property to ensure greater randomness when
generating random numbers.
Value:
The randomSeed property is an integer.
Comments:
Changing the randomSeed property changes the pseudorandom numbers
generated by the random function and used by the any keyword. Using
the same seed creates the same sequence of pseudorandom values.
For example, if you call the random function five times to generate a
list of five numbers, then change the randomSeed to another value,
the next five calls to the random function will produce a different
list of five numbers. However, if you set the randomSeed back to its
original value and call the random function five more times, the list
of five numbers is the same as the first list you generated.
Revolution uses a new randomSeed every time the application is
started up.
Le 8 déc. 06 à 14:33, Dave a écrit :
> Hi All,
>
> Anyone have any tricks for generating a random seed in RunRev?
>
> Thanks a lot,
> All the Best
> Dave
Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------
----------------------
http://www.sosmartsoftware.com/ eric.chatonet at sosmartsoftware.com/
More information about the use-livecode
mailing list