RND()

Syntax:

rnd!() | rnd() | rnd%()

The RND() function returns a pseudo-random number. Depending on the requested type, the return value can be:

  • a byte between 0 and 255
  • an integer between -32768 and +32767
  • a float between 0 and 1

Example:

print "we'll flip a coin"
if rnd() < 0 then print "heads" else print "tails"

Discussion

Enter your comment. Wiki syntax is allowed:
F J N B L
 
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies