Page 1 of 1

Random Number Question

Posted: Sun Mar 02, 2014 6:08 am
by UUICEO
If I use RandomSeed(1) in my program, will it produce the same value when I use Random(100) on every OS/CPU it is run on?

Code: Select all

RandomSeed(1)

Debug Random(100); Expected output = 72

RandomSeed(ElapsedMilliseconds())

Debug Random(100); Expected output is more random.

Re: Random Number Question

Posted: Sun Mar 02, 2014 6:51 am
by Shield
Yes, it should. If it doesn't it must be a bug. :)

Re: Random Number Question

Posted: Sun Mar 02, 2014 8:07 am
by UUICEO
I thought it should work that way.. I just wanted to make sure as I don't have my VM Workstation setup on this computer and no other OS's to test on.

Thanks for the reply.