5 lines
1.6 KiB
HTML
5 lines
1.6 KiB
HTML
<html><head><title>Command: Rnd </title><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><link rel='stylesheet' href='../css/commands.css' type='text/css'></head><body><span class='Command'> Rnd (start#,end#) </span></p><span class='header'>Definition:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>Returns a random number.</td></tr></table><span class='header'><br>Parameter Description:</span> <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>start# = Lowest value to generate<br>
|
|
end# = Highest value to generate<br></td></tr></table><p class='header'>Command Description: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>This returns either a floating point or integer number of a random value falling between the start and end number. It returns an integer if assiged to an integer variable, and it returns a floating point value if assiged to a floating number variable. The start and end values are inclusive. Be sure to use the <a href='SeedRnd.htm'>SeedRnd</a> command to avoid generating the same random numbers every time the program is run.</td></tr></table><p class='header'>Example: <br><br><table width='100%' border='0' cellspacing='2' cellpadding='2' align='center'><tr><td>y=Rnd(0,10) ; Set y to a random integer between 0 and 10<br>
|
|
y#=Rnd(0,5) ; Set y floating value between 0.000000 and 10.000000<br></td></tr></table><p><b><a target="_top" href="../index.htm">Index</a></b></p></body>
|
|
</html>
|