How nice is to see that there are people still using RANDOMIZE with pre-defined seed values to produce static lists of results to emulate disk stored data!
What I know so far is:
After the RANDOMIZE function is called, DBPro will generate a new random number for every RND call until RANDOMIZE is called again.
Example:
seed = 1
do
RANDOMIZE seed
cls
print RND(1)
print rnd(1)
print rnd(1)
wait key
loop
Every time you press the key, the same sequence of 0s and 1s will be generated - no matter which computer is running it, because RANDOMIZE and RND trust in simple divisions and modules to produce the results - and even if computer change, math remains the same.
The sequence generated in above code, however, may change if you add another RND onto it or change the range of any existing RND you already have.
Every new RANDOMIZE - even with the same seed number, will reset the sequence, allowing you to retrive the results how many times you need.
For example:
seed = 1
do
cls
RANDOMIZE seed
print rnd(1)
RANDOMIZE seed
print rnd(1)
RANDOMIZE seed
print rnd(1)
wait key
loop
In this example, wer call RANDOMIZE with our seed before every RND call, and what we get is the same result for all RNDs.
Ah, don't forget that if you change your code in such way the amount and order of RND calls change, the result you'll get will change, because DBPro treats RND results accordingly on the order of their calls.
[size=+2]Forever and one[/size]