Table of Contents

ugBASIC User Manual

RND ✓

SYNTAX

   = RND(max)

PURPOSE

The RND function generates integers at random, between zero and any number specified in brackets (minus one). If your specified number is greater than zero, random numbers will be generated up to that maximum number.

EXAMPLE

  score = score + RND(100)

See also the following example files:

AVAILABLE ON

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY