Range

A range of values

A few recipe requirements such as Time or Position need a range to function properly.

The range can be an unique number (in that case just specify it) or a range of values starting from negative infinity (-2147483648) to positive infinity (2147483647).

Several ranges can also be specified, in that case the tested value must match at least one of the specified range to pass.

Syntax :

The range must be specified with the following syntax :

  1. Start with [ (lower bound included) or ( (lower bound excluded).

  2. A number which will be the lower bound of the range, or nothing if you want no lower bound.

  3. A , to separate the lower bound from the upper bound.

  4. A number which will be the upper bound of the range, or nothing if you want no upper bound.

  5. End with ] (upper bound included) or ) (upper bound excluded).

  6. If you want to specify another range

Special cases :

  • Use "" or "*" to make a range that accept any values.

  • Use "1" to make a range that accept only the number 1.

Examples :

Some range examples are:

SpecDescription

"1"

Accept only 1

"[1,42)"

Accept 1 (included) to 42 (not included)

"[1,42]"

Accept 1 to 42 (both included)

"[1,)"

Accept 1 and higher

"(,1],[42,)"

Accept up to 1 (included) and 42 or higher