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


Return a random number in a range


Source position: math.pp line 505

function RandomRange(

  const aFrom: Integer;

  const aTo: Integer


function RandomRange(

  const aFrom: Int64;

  const aTo: Int64



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



Generate random number



Return a random element of an array of numbers

Documentation generated on: Jun 22 2020