# If Number is in Range

> Check if a number is in a specified range.

- ID: `if_number_in_range`
- Type: Condition
- Category: [Math](https://inventor.bot/docs/reference/blocks/math.md)

- Condition block: write `if if_number_in_range(Args{...}) { ... }`, or use it as a `"true"`/`"false"` value. See conditions.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `number` | yes | Number to check. | e.g. `"5"` |
| `minimum` | yes | Inclusive minimum value. | e.g. `"1"` |
| `maximum` | yes | Inclusive maximum value. | e.g. `"10"` |
| `if_true` |  | Blocks to run when the condition is true. | blocks: `func() { ... }` |
| `if_false` |  | Blocks to run when the condition is false. | blocks: `func() { ... }` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `result` | Whether the number is within the range. | e.g. `"true"` |

**Example**

```go
if if_number_in_range(Args{
	number:  5,
	minimum: 1,
	maximum: 10,
}) {
	send_text_message(Args{channel_id: trigger.channel_id, message_content: "Yes"})
}
```