# Range

A few recipe requirements such as [Time](https://frinn.gitbook.io/custom-machinery-1.19/recipes/requirements/time) or [Position](https://frinn.gitbook.io/custom-machinery-1.19/recipes/requirements/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 :&#x20;

The range must be specified with the following syntax :&#x20;

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 :&#x20;

* Use `""` or `"*"` to make a range that accept any values.
* Use `"1"` to make a range that accept only the number 1.

### Examples :&#x20;

Some range examples are:&#x20;

<table><thead><tr><th width="180" align="center">Spec</th><th>Description</th></tr></thead><tbody><tr><td align="center"><code>"1"</code></td><td>Accept only 1</td></tr><tr><td align="center"><code>"[1,42)"</code></td><td>Accept 1 (included) to 42 (not included)</td></tr><tr><td align="center"><code>"[1,42]"</code></td><td>Accept 1 to 42 (both included)</td></tr><tr><td align="center"><code>"[1,)"</code></td><td>Accept 1 and higher</td></tr><tr><td align="center"><code>"(,1],[42,)"</code></td><td>Accept up to 1 (included) and 42 or higher</td></tr></tbody></table>
