Results 1 to 10 of 10

Thread: Randomize

  1. #1

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Randomize

    i want to ask randomize is to use one time only in an application or can be used every time before using RND..

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Randomize

    just once

  3. #3

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Randomize

    ok i use it more that once ...
    the what will happen ....?

  4. #4
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Randomize

    theres no point, that i hear "Un-Randomizes" it by taking away its effects

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    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.

  6. #6
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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.

  7. #7

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Randomize

    but i have tried by using three time in one procedure .. but it is absolutely random ...

  8. #8
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Randomize

    it isnt absolutely random, because it is impossible to be..

  9. #9
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    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.

  10. #10

    Thread Starter
    Fanatic Member vbPoet's Avatar
    Join Date
    Feb 2005
    Location
    Searching ..
    Posts
    669

    Re: Randomize

    hmm ok thank you..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width