# Range

A few recipe requirements such as [Time](/custom-machinery-1.19/recipes/requirements/time.md) or [Position](/custom-machinery-1.19/recipes/requirements/position.md) 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>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://frinn.gitbook.io/custom-machinery-1.19/misc/range.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
