| Prev | Next | Basic Verbs > random |
random
| Syntax |
random (lower, upper)
|
| Params |
lower is a number that defines the smallest random number you wish to generate. upper is a number that defines the largest random number you wish to generate.
|
| Action |
Generates a random number between lower and upper. The range is inclusive on both ends (that is, it is possible that both lower and upper will be generated by the use of this verb).
|
| Returns |
The random number generated.
|
| Examples |
random (1, 5) » 4
The return could be 1, 2, 3, 4, or 5.
The return could be -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, or 5. |
| Errors |
If either lower or upper is not an integer value, an error message is generated. If upper is less than lower, this verb generates an error.
|
| Prev | Next | Basic Verbs > random |