Jump to navigation Jump to search
Revision as of 07:17, 15 October 2010 by
RANDOMIZE is used with a seed number to generate different random number sequences using the RND function.
Syntax: RANDOMIZE seednumber
- The seednumber can be any positive or negative numerical value. The TIMER value is often used.
- If the same initial seed number is used, the sequence of random numbers returned will be identical every run.
- The fact that random numbers would always be the same has been used for simple data encrytion.
- Using a TIMER starting value ensures that the initial return sequence values are different almost every time!
Example: Using RANDOMIZE TIMER to set a different starting sequence of numbers every run.
- Explanation: Procedure generates random integer values from 2 to 12 like a pair of dice.