rand - luxembourg/muxcode-clm GitHub Wiki

RAND()

FUNCTION: rand(<num>) rand(<lower>, <upper>)

In the first form, rand() returns an integer between 0 and num-1. In the second form, rand() returns an integer between <lower> and <upper>, inclusively.

Example: > say rand(10) You say, "6" > say rand(10) You say, "1" > say rand(-1,2) You say, "0"

Related Topics: die, lrand, pickrand, shuffle