The RANDOM function returns a numeric value that is a pseudorandom number from a rectangular distribution.
The function type is numeric.
| Format |
|---|
|
If a subsequent reference specifies argument-1, a new sequence of pseudorandom numbers is started.
If the first reference to this function in the run unit does not specify argument-1, the seed value used will be zero.
In each case, subsequent references without specifying argument-1 return the next number in the current sequence.
The returned value is exclusively between zero and one.
For a given seed value, the sequence of pseudorandom numbers is always the same.
The RANDOM function can be used in threaded programs. For an initial seed, a single sequence of pseudorandom numbers is returned, regardless of the thread that is running when RANDOM is invoked.