User Tools

Site Tools


4rpl:commands:randint

This is an old revision of the document!


RANDINT

randInt (0 10) ->randi

Description

Returns a random integer from a range of two numbers Inclusive of the lower number, but exclusive of the higher number. A workaround for between 0 and 10 both inclusive is in the example below. is to do 0 11 RandInt, so 11 will exclude but 10 will include [basically, 0 10 1 add RandInt]

Examples

# get a random integer between 1 and 10 (both numbers inclusive)
RandInt(0 11)
#
# or
#
RandInt( 0 10 add (1)) # functionally equivalent.
4rpl/commands/randint.1564231828.txt.gz · Last modified: 2025/02/14 14:56 (external edit)