random | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | |||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: any, integer Property: randomSeed Function: round, random Glossary: return Control Structure: function | ||||||
Description | Use the random function to pick a random member of a set, or to generate a random number. If the upperLimit is a positive integer, the random function returns an integer between 1 and the upperLimit. If the upperLimit is a number that is not an integer, the random function returns an integer between 1 and round(upperLimit). To generate a random number between two integers, use a handler like this:
| ||||||
Tags | math |