---
name: "case"
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/case
revid: 347319
updated: 2023-09-10T15:36:24Z
---

# case

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

## Description

This command is used as a keyword inside a [switch](../commands/switch.md) structure to define a value case.

> [!IMPORTANT]
> This command **must** be written and used inside a [switch](../commands/switch.md) construct, never stored in a variable, otherwise its behaviour is not guaranteed - see <https://foxhound.international/arma-3-sqf-grammar.html> for further explanation.

## Syntax

```sqf
case b
```

**Parameters:**

- `b`: [Anything](../topics/Anything.md)

**Returns:** [Switch Type](../topics/Switch_Type.md)

## Examples

### Example 1

```sqf
switch (_condition) do
{
    case 1: { hint "1" };
    case 2: { hint "2" };
    default { hint "default" };
};
```

## See also

[Control Structures](../topics/Control_Structures.md) · [switch](../commands/switch.md) · [default](../commands/default.md)

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