Skip to content

is_in_range

Syntax

is_in_range(expression, lower_bound, upper_bound)

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.

Description

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

Examples

The following selects agents from ages 18 through 21:

if (is_in_range(age, 18, 21)) {
    ...
}

See Also