---
name: "to"
type: command
status: ok
groups: ["Program Flow"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/to
revid: 311163
updated: 2022-05-12T09:48:15Z
---

# to

*Command · Program Flow · Arma 3 v0.50 · introduced in Armed Assault v1.00*

## Description

Continue sequence of [for](../commands/for.md) construct. It sets the end value of the index variable.

## Syntax

```sqf
forType to b
```

**Parameters:**

- `forType`: [For Type](../topics/For_Type.md)
- `b`: [Number](../topics/Number.md)

**Returns:** [For Type](../topics/For_Type.md)

## Examples

### Example 1

```sqf
for "_i" from 10 to 20 do
{
    hint str _i; // will hint from 10 to 20, spaced by 1 second
    sleep 1;
};
```

## See also

[Control Structures](../topics/Control_Structures.md) · [for](../commands/for.md) · [from](../commands/from.md) · [step](../commands/step.md)

<sub>Source: [BI Community Wiki — to](https://community.bistudio.com/wiki/to) (revision 311163).</sub>
