Random
See Also: Math Functions
Purpose
The Random function returns a random number between zero and a specified upper limit.
Return Type
Syntax
Random({limit})
Parameters
- {limit}: Determines the upper limit of the generated random number.
What It Does
The Random function returns a randomly-generated integer whose absolute value is between zero and {limit}.
Move (Random(10000000)) to iNumberToDial
In this example, a random number from zero to 9,999,999 is moved to the variable iNumberToDial.
Notes
-
The
Randomfunction returns only values having the same sign as{limit}. If{limit}is negative, the returned value will always be negative. -
This function returns a value of type integer. If
{limit}is not an integer, its value will be converted to that type for use in this function. If the result of this function is moved to a variable of a type other than integer, its value will be converted to the destination type.