Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Rnd function ====== ==== Description ==== Returns a random numeric integer. You can use the InitRnd statement to initialize the Rnd function. ==== Syntax ==== //random// = **Rnd**(//expression//) ==== Parameters ==== The Rnd function has the following parameters. ^Parameter^Description^ |//Expression//|Any legal BASIC+ expression.| \\ \\ \\ The Rnd function returns a random number that is from 0 (zero) to the designated number. For example, in\\ \\ N = Rnd(500)\\ \\ the variable identifier N will be assigned a random number from 0 to 500. Note that 0 (zero) is a possible number in the random selection.\\ \\ An expression designating null or (0) returns a (0). A negative expression returns a negative random number.| ==== See Also ==== [[initrnd|InitRnd]] ==== Example ==== <code> /* Assigns a number between 0 and 100. */ random_num = Rnd(100) ** ** </code> guides/programming/programmers_reference_manual/rnd.txt Last modified: 2024/06/19 20:20by 127.0.0.1