RANDOM

 ──RANDOM(─┬──────────────────────────┬─)────
             ├─max──────────────────────┤

             ├─min,─┬─┬─────┬─┬───────┬─┘
             └─,────┘ └─max─┘ └─,seed─┘

RANDOM returns a quasi-random, nonnegative whole number in the range min to max inclusive. If only one argument is specified, the range will be from 0 to that number. Otherwise, the default values for min and max are 0 and 999, respectively. A specific seed (which must be a whole number) for the random number can be specified as the third argument if repeatable results are desired.

The magnitude of the range (that is, max minus min) must not exceed 100000.

Here are some examples:

RANDOM()          ->    305
RANDOM(5,8)       ->      7
RANDOM(,,1983)    ->    123  /* reproducible */
RANDOM(2)         ->      0

Notes:


[Back: QUEUED]
[Next: REVERSE]