en:autorun:documentation:random
Random
Random([<min>, <max> [, <integer>]])
The function generates and returns a pseudo-random value within the given range.
Parameters
min | Optional. The minimum value of the range. The default is 0. |
max | Optional. The maximum value of the range. The default is 1. |
flag | Optional. If the flag is 1, returns integers in the given range, including the upper value of the range. Otherwise, it returns real numbers greater than or equal to min and less than max. |
Remarks
If the min parameter is specified, the max parameter is required.
Examples
MsgBox(Random()) # --> a number greater than or equal to 0 and less than 1 MsgBox(Random(1, 100, 1)) # --> integer in the range from 1 to 100 MsgBox(Random(1, 10)) # --> a number greater than or equal to 1 and less than 10
en/autorun/documentation/random.txt · Последнее изменение: 2022/10/17 16:14 — loopback