Int rand()
Usage
rand() returns a pseudo-random signed integer in the range +/- (2**31)-1
You must call srand before the first call to this function in a program.
srand(12345);
for i in [1..5] {
putStr(rand()+" ");
}
Gives: 1995772607 -612336503 -885735441 457910745 1875493919
The rand() function is a low-quality but fast generator - for better quality numbers, use the optional Lfrand module or for cryptographic purposes, your computer's hardware RNG.