RND() Function - Random Number
Syntax
RND(int{,ERR=lineref})
For BBj-specific information, see the RND() Function - BBj.
Description
The RND() function returns a sequence of random numbers. The sequence of values returned is determined by a "seed value." The same sequence results each time a given seed is used.
Though PRO/5 cannot guarantee identical random number sequences between different implementations, the same seed is guaranteed to produce the same sequence ONLY on the same implementation. PRO/5 sets the RND() seed with the same value, whenever PRO/5 is loaded.
Examples
1000 LET A=RND(0); REM - VALUE BETWEEN 0 AND 1
1020 LET B=RND(-392); REM - SET SEED AND RETURN VALUE
1030 LET C=RND(52); REM - RETURN INT BETWEEN 0 AND 51