[Gambas-user] Re: Re: Am I doing something wrong?

A Person kztyrvlq at ...966...
Wed Jun 29 21:39:15 CEST 2005


Wednesday, 29 June 2005

Thank You for the reply.

I tried about every possible combination of randomize timer but it
generated error messages. I tried "Randomize Timer", "Randomize() Timer"
and "Randomize Timer()" to name a few but nothing worked.

I found this on a web site, "Notes: The number argument can be any
permissible numeric expression. The random-number generator is
initialised by number, as a new initial value is assigned to it. If you
omit number, as new initial value the value spent of the timer function
is used. Thus the instruction Randomize timer is actually redundant."

So I am using "Randomize()" before each Rnd.

My recent workaround is to create a timer with a 1050 delay so that each
random number generation is at least one second later than the previous.

It appears to work but it is not a good solution.







More information about the User mailing list