is_in_range()

Checks if a value is in a range.

Synopsis

is_in_range(expression, lower_bound, upper_bound)

Description

Checks if expression is within the range of lower_bound and upper_bound, inclusive.

Parameters

  • expression

    The value being checked

  • lower_bound

    the lower bound of the range

  • upper_bound

    the upper bound of the range

Returns

True if the value of expression is between the lower_bound and upper_bound, inclusive. False otherwise.

Examples

The following selects agents from ages 18 through 21:

if (is_in_range(age, 18, 21)) then ...

See Also

is_in_list()