---
name: "-"
type: command
operator: "-"
status: ok
groups: ["Math", "Arrays"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/-
revid: 377197
updated: 2026-01-01T11:31:15Z
---

# -

*Command · Math, Arrays · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

## Description

Subtracts numbers or arrays from each another, negates a number. For arrays also see [deleteAt](../commands/deleteAt.md) and [deleteRange](../commands/deleteRange.md).

> [!NOTE]
> **Arma 3:** In Arma 3 it is possible to subtract nested arrays.

## Syntax

### Syntax 1

```sqf
numberA - numberB
```

**Parameters:**

- `numberA`: [Number](../topics/Number.md)
- `numberB`: [Number](../topics/Number.md)

**Returns:** [Number](../topics/Number.md)

### Syntax 2

```sqf
- numberA
```

**Parameters:**

- `numberA`: [Number](../topics/Number.md)

**Returns:** [Number](../topics/Number.md) - the negative of *numberA*

### Syntax 3

```sqf
arrayA - arrayB
```

**Parameters:**

- `arrayA`: [Array](../topics/Array.md) of [Anything](../topics/Anything.md)
- `arrayB`: [Array](../topics/Array.md) of [Anything](../topics/Anything.md)

**Returns:** [Array](../topics/Array.md) of [Anything](../topics/Anything.md)

## Examples

### Example 1

```sqf
_result = 10 - 7; // result is 3
```

### Example 2

```sqf
_numA = 4;
_numB = -_numA; // result is -4
_numB = -_numB; // result is  4
```

### Example 3

```sqf
_result = [1, 2, 2, player, "String"] - [2, player, player, "String"]; // _result is [1]
```

### Example 4

```sqf
_result = [0, [0], [[0]]] - [0]; // [[0], [[0]]]
```

### Example 5

```sqf
_result = [0, [0], [[0]]] - [[0]];        // [0, [[0]]]    - Since Arma 3
_result = [0, [0], [[0]]] - [[[0]]];    // [0, [0]]        - Since Arma 3
```

## See also

[Array](../topics/Array.md) · [Operators](../topics/Operators.md) · [deleteAt](../commands/deleteAt.md) · [deleteRange](../commands/deleteRange.md)

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