Purpose: | Generate a random integer, bool, float, char, or string. |
Format: | RANDOM [/I start, end] /[B] [/F start, end, precision] [/C start, end] [/S start, end, length] [/D n] |
Usage:
RANDOM can generate a variety of random output - integers, booleans, floating point numbers, characters, or strings.
See also @RANDOM.
Examples:
To create a random integer between 5 and 15:
random /i 5, 15
To create a random float between 1.7 and 2.6, to 5 decimal places:
random /f 1.7, 2.6, 5
Options:
/B - Create a boolean (0 or 1)
/C start, end - Create a character between (inclusive) the characters start and end.
/D n - Roll an n sided dice.
/F start, end, precision - Create a floating point number >= start and <= end, with precision decimal places. Start and end can be integers or floats.
/I start, end - Create an integer >= start and <= end. The start and end arguments are signed 64-bit values.
/S start, end, length Create a string composed of characters between start and end (inclusive).