Re: generate random numbers



Nigel Bufton wrote:
Randomize alone will always generate the same randomization table.


Not so. In VB6, Randomize alone is the equivalent of "Randomize Timer". You could look it up.

And to be clear, Randomize should be called once per session, not for each new value. Doing the latter can make the distribution less random.

--

Jim Mack
MicroDexterity Inc
www.microdexterity.com
.



Relevant Pages

  • Re: Why Randomize() wont work?
    ... > This code found at the Reference page of Randomize() at MSDN won't run ... This code is VB.NET, not VB6. ... > The compiler don't like the line "Randomize"? ... I'm not sure if you can still find help for VB6 in the online MSDN. ...
    (microsoft.public.vb.general.discussion)
  • Re: Random
    ... Erzeuge Zufallszahlen von 0 - 36. ... Randomize Timer ' oder Randomize ... Wenn Sie Zahl ...
    (microsoft.public.de.vb)
  • Re: How to get a never decreasing sequence of random variates
    ... RANDOMIZE TIMER ... IF x < minn THEN minn = x ... IF x> maxx THEN maxx = x ...
    (sci.stat.math)
  • Re: Random NUmber Generator creates duplicates
    ... change your RANDOMIZE statement to RANDOMIZE TIMER ... Host help and see where you got your quote from. ... Do you suppose moving the Randomize statement inside his loop would help? ...
    (microsoft.public.scripting.vbscript)
  • Re: Random NUmber Generator creates duplicates
    ... change your RANDOMIZE statement to RANDOMIZE TIMER ... generator, giving it a new seed value. ... Sammamish WA US ...
    (microsoft.public.scripting.vbscript)