inrange_check_number_within_range_.htm
Navigation: Language Reference > 13 - Built-in Functions >====== INRANGE (check number within range) ====== | |
INRANGE(expression,low,high)
INRANGE | Return number in valid range. |
expression | A numeric constant, variable, or expression. |
low | A numeric constant, variable, or expression of the lower boundary of the range. |
high | A numeric constant, variable, or expression of the upper boundary of the range. |
The INRANGE procedure compares a numeric expression to an inclusive range of numbers. If the value of the expression is within the range, the procedure returns the value 1 for “true.” If the expression is greater than the high parameter, or less than the low parameter, the procedure returns a zero for “false.”
Return Data Type: | LONG |
Example:
IF INRANGE(Date % 7,1,5) !If this is a week day
DO WeekdayRate !use the weekday rate
ELSE !Otherwise
DO WeekendRate !use the weekend rate
END
inrange_check_number_within_range_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1