Back in the day of peeks, pokes and calls in BASIC, there was a seed location for the rnd() function.
Went something like this:
poke(XX1) 1
poke(XX2) 1
poke(XX3) 1
poke(XX4) 1
poke(XX5) 1
This put the value 1 into those locations, then
int(rnd(0;255))
would return an integer value between 0 and 255, say, 92.
another int(rnd(0;255)) would return 219, and a third int(rnd(0;255)) would return 47.
Poking 1s into those locations again and another 3 calls to int(rnd(0;255)) would produce the same series of 'random' numbers; 92, 219 and 47.
Question;
Does anyone know of a similar situation where the rnd() return will be predictable?
I have just retired and have always wanted to complete an encryption proggy with this as the core, but have progressed to C++, VB and C#.
Thanks in advance,
xxxxxxx@xxxxxxxxxxxxxx
Edit Email addresses are not allowed in posts. All answers will be provided here in this topic. -- GModX
