Random

Note that this function does not round values to integers. Also, random does not return negative values.

Examples
According to the definition above: t = random(5); Will never return 5, in order to return '5', the ceil function must be used.

The returned values include integers (3, 55, 67356 ,0...) and real numbers (3.5, 55.82, 67356.0, 0.7). So random(3) can return any number in the range: 0 - 2.99999999999999999999.

Be careful when using random(x) to choose whole numbers to do different things (e.g pick a number between 0 and 10, if 0 do this, if 1 do this, if 2 do this, if 3 do this...) as you may find that it seems not to work, this is usually because you're checking for whole numbers (1, 2, 3, 4, 5...) and random(x) is returning real numbers (3.67, 2.84, 1.5, 0.9) In order to produce whole numbers only, place either ceil, floor or round in front: ((10)); ((10)); ((10));