Page 1 of 1

Randomseed, does it work?

Posted: Thu Dec 05, 2024 8:43 pm
by artnat
I wanted a random sequence, which is always the same. Here a four lines example:

Code: Select all

randomseed = 0
For i.l = 1 To 10
  Debug Random(100000)
Next
I expected alsways the same sequence of ten random numbers, but they are different each time. What am I doing wrong? Or what is the benefit of randomseed?

Re: Randomseed, does it work?

Posted: Thu Dec 05, 2024 8:54 pm
by idle
you need to call the function

Code: Select all

RandomSeed(0)

Re: Randomseed, does it work?

Posted: Thu Dec 05, 2024 9:04 pm
by artnat
Ooooh, I was blind!

Re: Randomseed, does it work?

Posted: Thu Dec 05, 2024 9:10 pm
by idle
artnat wrote: Thu Dec 05, 2024 9:04 pm Ooooh, I was blind!
hehe, that's a normal day for me with dyslexia

Re: Randomseed, does it work?

Posted: Fri Dec 06, 2024 5:32 am
by Quin
idle wrote: Thu Dec 05, 2024 9:10 pm
artnat wrote: Thu Dec 05, 2024 9:04 pm Ooooh, I was blind!
hehe, that's a normal day for me with dyslexia
And a normal day for me just in general :P

Re: Randomseed, does it work?

Posted: Fri Dec 06, 2024 5:49 am
by jacdelad
idle wrote: Thu Dec 05, 2024 9:10 pm
artnat wrote: Thu Dec 05, 2024 9:04 pm Ooooh, I was blind!
hehe, that's a normal day for me with dyslexia
I have daily sex...no, I mean, I have dyslexia. :wink:

Re: Randomseed, does it work?

Posted: Fri Dec 06, 2024 7:45 am
by idle
jacdelad wrote: Fri Dec 06, 2024 5:49 am
idle wrote: Thu Dec 05, 2024 9:10 pm
artnat wrote: Thu Dec 05, 2024 9:04 pm Ooooh, I was blind!
hehe, that's a normal day for me with dyslexia
I have daily sex...no, I mean, I have dyslexia. :wink:
enjoy it while your young :lol: