Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Initial ramdom seed number?

5 views
Skip to first unread message

JJ

unread,
Jan 31, 2023, 12:35:45 AM1/31/23
to
Does anyone know the number to be used with `randomize` to set the random
seed which is same as the predefined initial random seed?

e.g. with below code...

'start of code. no other code exist before this line
a = rnd
b = rnd

The `a` variable would always contain `0.7055475`, and `b` would aways
contain `0.533424`. Whether it's VB6, VBA (Office), or VBScript. And
regardless of OS edition and versions. e.g. WinME, WinXP, Win7; all produce
the same result.

I know that, setting a random seed must be done by first calling `rnd(-1)`
then executing `randomize` with a specific number. But what number to use to
match with the predefined initial random seed?

JJ

unread,
Jan 31, 2023, 12:38:03 AM1/31/23
to
On Tue, 31 Jan 2023 12:35:43 +0700, JJ wrote:
> Whether it's VB6, VBA (Office), or VBScript.

Excluding .NET crap's VB.NET.
0 new messages