---
name: "+"
type: command
operator: "+"
status: ok
groups: ["Math", "Arrays", "HashMap", "Strings"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/%2B
revid: 377977
updated: 2026-01-19T18:47:06Z
---

# +

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

## Description

Add two [Number](../topics/Number.md)s, concatenate two [Array](../topics/Array.md)s or two [String](../topics/String.md)s, or create a copy of an Array or [HashMap](../topics/HashMap.md).

> [!WARNING]
> [Array](../topics/Array.md) copy methods `ARRAY + []` and `+ ARRAY` have different behaviours:
> - `ARRAY + []` creates copy of the 1st dimension, but preserves references in other dimensions ([shallow copy](https://en.wikipedia.org/wiki/Object_copying#Shallow_copy)).
> - `+ ARRAY` clones every element, so if the array is multi-dimensional, the created copy contains no references ([deep copy](https://en.wikipedia.org/wiki/Object_copying#Deep_copy)).
> See [Example 6](../commands/~2B.md#example_6).

## Syntax

### Syntax 1

```sqf
numberA + numberB
```

**Parameters:**

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

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

### Syntax 2

```sqf
+ number
```

**Parameters:**

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

**Returns:** [Number](../topics/Number.md) - the value of the parameter *number*

### 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) - a new array filled with *arrayA* and *arrayB* elements, in that order

### Syntax 4

```sqf
stringA + stringB
```

**Parameters:**

- `stringA`: [String](../topics/String.md)
- `stringB`: [String](../topics/String.md)

**Returns:** [String](../topics/String.md) - a string concatenating *stringA* and *stringB*

### Syntax 5

```sqf
+ array
```

**Parameters:**

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

**Returns:** [Array](../topics/Array.md) of [Anything](../topics/Anything.md) - a new instance of the provided array filled with same elements ([deep copy](https://en.wikipedia.org/wiki/Object_copying#Deep_copy))

### Syntax 6

*since arma3 2.04*

```sqf
+ hashMap
```

**Parameters:**

- `hashMap`: [HashMap](../topics/HashMap.md)

**Returns:** [HashMap](../topics/HashMap.md) - a new instance of the provided [HashMap](../topics/HashMap.md) filled with the same key-value pairs ([deep copy](https://en.wikipedia.org/wiki/Object_copying#Deep_copy))

## Examples

### Example 1

```sqf
 5 +  3    // returns  8
-5 + -3    // returns -8
```

### Example 2

```sqf
+  2    // returns  2
+ -7    // returns -7
```

### Example 3

```sqf
_arrayA = [1,2,3];
_arrayB = [3,4,5];
_arrayAB = _arrayA + _arrayB; // _arrayAB = [1,2,3,3,4,5]
// _arrayA and _arrayB remain unchanged
```

### Example 4

```sqf
_result = "Hello" + " " + "there"; // "Hello there"
```

### Example 5

```sqf
_arrayA = [1,2,3];
_arrayB = + _arrayA;
_arrayB set [0, 99]; // _arrayA = [1,2,3], _arrayB = [99,2,3]
```

### Example 6

Shallow copy with `ARRAY + []`:

```sqf
private _subArray = [1, 2, 3];
private _array1 = [_subArray, 1, 2, 3];
private _array2 = _array1 + [];
_array2 select 0 set [0, "oops"];
hint str _subArray; // ["oops", 2, 3]
```

Deep copy with `+ ARRAY`:

```sqf
private _subArray = [1, 2, 3];
private _array1 = [_subArray, 1, 2, 3];
private _array2 = + _array1;
_array2 select 0 set [0, "oops"];
hint str _subArray; // [1, 2, 3]
```

## See also

[Operators](../topics/Operators.md) · [pushBack](../commands/pushBack.md) · [append](../commands/append.md) · [merge](../commands/merge.md)

<sub>Source: [BI Community Wiki — +](https://community.bistudio.com/wiki/%2B) (revision 377977).</sub>
