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

VarInRange

Check if a variant is in a range of values

Declaration

Source position: variants.pp line 98

function VarInRange(

  const AValue: Variant;

  const AMin: Variant;

  const AMax: Variant

):Boolean;

Arguments

AValue

  

Value to check

AMin

  

Lower bound of range

AMax

  

Upper bound of range

Function result

True if AValue is in range [AMin..AMax]

Description

VarInRange is an auxiliary function which checks whether AValue is in the range defined by AMin and AMax, borders included.

Errors

If the variants are of different types and they cannot be converted, an exception will be raised.

See also

VarEnsureRange

  

Make sure the variant is within a specified range.


Documentation generated on: Jun 23 2021