Inclusive and exclusive ranges

Corticon Studio also gives you the option of defining value ranges where one or both of the starting and ending values are exclusive, meaning that the starting/ending value is not included in the range of values. Rulesheet using an Integer Value Range in Condition Values Set shows the same Rulesheet as in Rulesheet using Numeric Value Ranges in Condition Values Set, but with one difference: we have changed the value range 201..300 to (200..300]. The starting parenthesis ( indicates that the starting value for the range, 200, is excluded – it is not included in the range of possible values. The ending bracket ] indicates that the ending value is inclusive. Since integer1 is an Integer value, and therefore no fractional values are allowed, 201..300 and (200..300] are equivalent and our Values set in Rulesheet using an Integer Value Range in Condition Values Set is still complete as it was in Rulesheet using Numeric Value Ranges in Condition Values Set.

Figure 88. Rulesheet using an Integer Value Range in Condition Values Set

Listed below are all of the possible combinations of parenthesis and bracket notation for value ranges and their meanings:

As illustrated in Rulesheet using Numeric Value Ranges in Condition Values Set and Rulesheet using an Integer Value Range in Condition Values Set, if a value range has no enclosing parentheses or brackets, it is assumed to be closed. It is therefore not necessary to use the [..] notation for a closed range in Corticon Studio; in fact, if you try to create a closed value range by entering [..], the square brackets will be automatically removed. However, should either end of a value range have a parenthesis or a bracket, then the other end must also have a parenthesis or a bracket. For example, x..y) is not allowed, and is properly expressed as [x..y).

When using range notation, always ensure x is less than y, i.e., an ascending range. A range where x is greater than y (a descending range) may result in errors during rule execution.