| System Functions |
|
| Format | RND(seed[,ERR=stmtref]) Where:
|
||||||
| Returns | Random numbers based on given seed. | ||||||
| Description | The RND(
) function returns random numbers based on the seed
given. The following table describes the value returned
based on the seed value:
Each call to the RND( ) function will return a different random number. To change the seed value for the random number generation you can either execute a RANDOMIZE directive or call RND( ) with a negative value. If your value is not an integer, ProvideX returns Error #41: Invalid integer encountered (range error or non-integer). |
||||||
| See Also | RANDOMIZE Directive RND System Variable |
||||||
| Example | 0010 REM 0020 FOR I=1 TO 10 0030 PRINT RND(9), 0040 NEXT 0050 PRINT 'LF',RND(0) 0060 PRINT RND(-1) 0070 PRINT " DONE"; END -:run 1 1 7 0 7 7 4 4 5 7 0.05947216 0.11337858 DONE |