function Random(AFrom: Integer=0; ATo: Integer=<MaxInt>): Integer
The Random function returns a pseudorandom number greater than or equal to the AFrom parameter, if provided, and less than or equal to the ATo parameter, if provided. The default AFrom parameter value is 0, and the default ATo parameter value is the maximum integer value. At runtime, the maximum integer value is 9007199254740991, and at design-time the maximum integer value is 9223372036854775807. The return value is an Integer value.
Examples
X := Random; // X is 7534176611 (pseudorandom value)
X := Random(0,1000); // X is 269 (pseudorandom value)