Open main menu

Changes

274 bytes added ,  18:43, 5 October 2013
m
no edit summary
* {{cmd|getrandomnumber}} - Generates a pseudo-random number each time.
* {{cmd|ctxlua}}<tt>{math.randomseed(os.time())}</tt> - Sets the seed based on the computer's timestamp.
 
The random seed is stored in the `tuc` file so that you get the same output each time the file is compiled (otherwise, multiple compiles can lead to an infinite cycle and you may not get all the references correct). Another approach is to delete the tuc file between runs.
419

edits