Changes

Locomotive BASIC

180 bytes added, 20:38, 19 September 2012
/* RANDOMIZE [seed] */
==== <code>RANDOMIZE [seed]</code> ====
: Resets the pseudo-random generator to the given seed(starting value of the 'random' series). What is strange is that if no seed is given, one is interactively prompted for.
: A common idiom to have a ''random'' random seed is to do:
</pre>
: <code>RANDOMIZE TIME</code> isn't still a 'real' random number but to hit the same series again is pretty hard due to the time elapsed.: The algorithm used for randomizing is the following: the generator starts with the seed, adds 1, multiplies by 75 (fiddle factor), divides by 65537 and then uses the remainder -1.
==== <code>READ variable</code> ====
205
edits