On 18/07/2008 21:57, Dilwyn Jones wrote:
Interestingly, as an aside, if you supply fixed RANDOMISE values
beforehand, IIRC it would generate the same sequence of random numbers.
I recollect using this feature when writing computer games on my ZX81
many years ago. The equivalent RAND keyword with a fixed seed would
ensure the game started the same way every time so with experience one
could master the earlier stages.
One such game consisted of piloting a "vehicle" through a vertical
scrolling tunnel which progressively narrowed. I played it for so long
that I had vertical nystagmus for several hours afterwards!
Of course, if you use RANDOMISE without a number, it creates random
numbers, based on using the time value to seed the random number
generator, about as random as the Sinclair random number can get.
Some random number generators such as that in the TrueCrypt
encryption program use other factors such as keyboard presses and mouse
movements to generate a series of random numbers that don't follow a
reproducible pattern as they are independent of the passage of time.
--
Regards,
Stephen
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm