[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 465

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: Mar 17 2017