[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'Math' (#rtl)

RandomRange

Return a random number in a range

Declaration

Source position: math.pp line 513

function RandomRange(

  const aFrom: Integer;

  const aTo: Integer

):Integer;

function RandomRange(

  const aFrom: Int64;

  const aTo: Int64

):Int64;

Description

RandomRange returns a random value in the range AFrom to ATo. AFrom and ATo do not need to be in increasing order. The upper border is not included in the generated value, but the lower border is.

See also

#rtl.system.Random

  

Generate random number

RandomFrom

  

Return a random element of an array of numbers


Documentation generated on: May 14 2021