Quote:


Second is seeding of a RND, when would be the appropriate time to use them, and why would you seed a RND.

Thanks.




you will always want to seed a RND, because you see... RND is not realt all that random.

run the following code.

Code:

for $i = 1 to 10
? RND(10)
next



you get this....?
Code:

G:\kix\sandbox>kix32 test

0
6
2
8
6
5
3
9
9
8



and... you get it everytime that you will run it too.

now, run this.

Code:
SRND(@msecs)
for $i = 1 to 10
? RND(10)
next



that should shake things up enough to get... "random numbers". but if you always use the same seed, you will always get the same random numbers.


Edited by Bryce (2005-10-13 11:00 PM)