Generates a random number.
Function
There are two distinct calls which output different data types.
n = rand(lower, upper)
x = rand()
Arguments
Argument | Data Type |
lower | integer |
---|---|
upper | integer |
n | integer |
x | decimal |
Comments
If two integers inputs are provided, then rand generates a random integer from lower to upper inclusive.
If no inputs are provided, then rand generates a random decimal between zero and one.
The rand function is not available for use in reports.
Examples
result = rand(1, 100) // example result = 74
result = rand() // example result = 0.988