| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== INRANGE (check number within range) ====== | [[inlist return entry in list .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[instance return variable s thread instance address 1.htm|{{btn_next_n.gif|Next page}}]] | | || **INRANGE(**//expression//,//low//,//high//**)** {{blk2blue.jpg|blk2blue.jpg}} | **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**