|
-
Jun 12th, 2005, 10:54 PM
#1
Thread Starter
Fanatic Member
Randomize
i want to ask randomize is to use one time only in an application or can be used every time before using RND..
-
Jun 12th, 2005, 11:05 PM
#2
Re: Randomize
just once
-
Jun 12th, 2005, 11:11 PM
#3
Thread Starter
Fanatic Member
Re: Randomize
ok i use it more that once ...
the what will happen ....?
-
Jun 12th, 2005, 11:13 PM
#4
Re: Randomize
theres no point, that i hear "Un-Randomizes" it by taking away its effects
-
Jun 12th, 2005, 11:18 PM
#5
Re: Randomize
If you use Randomize (Randomize Timer, whatever) once, and look at the pattern of random numbers generated over the course of the application's lifetime, then it will be a fairly even spread, because you have seeded the generator once only. If you then seed it again, then you are altering the distribution from that point on, so on a graph of the numbers generated over the app's lifetime you will two separate distributions. Eventually after many many Rnd calls you will end up with an even distribution again, but for every subsequent Randomize call you do change the random effect as |2eM!x said.
-
Jun 12th, 2005, 11:20 PM
#6
Re: Randomize
you only need it once to seed the random number generator. that results in rnd being as close to random as you can get.
The optional numberargument is aVariant or any validnumeric expression.
Remarks
Randomize uses number to initialize the Rnd function's random-number generator, giving it a newseed value. If you omit number, the value returned by the system timer is used as the new seed value.
If Randomize is not used, the Rnd function (with no arguments) uses the same number as a seed the first time it is called, and thereafter uses the last generated number as a seed value.
Note To repeat sequences of random numbers, call Rnd with a negative argument immediately before using Randomize with a numeric argument. Using Randomize with the same value for number does not repeat the previous sequence.
-
Jun 12th, 2005, 11:22 PM
#7
Thread Starter
Fanatic Member
Re: Randomize
but i have tried by using three time in one procedure .. but it is absolutely random ...
-
Jun 12th, 2005, 11:25 PM
#8
Re: Randomize
it isnt absolutely random, because it is impossible to be..
-
Jun 12th, 2005, 11:28 PM
#9
Re: Randomize
It is just a waste of processor time, and actually could make your data less random. Just call randomize once in your app, and it will be as random as it can be when you call RND, which you can do as many times as you want.
-
Jun 12th, 2005, 11:34 PM
#10
Thread Starter
Fanatic Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|