---
name: "BIS_fnc_areEqual"
type: function
status: ok
groups: ["Variables"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_areEqual
revid: 363456
updated: 2024-03-30T21:12:17Z
---

# BIS_fnc_areEqual

*Function · Variables · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

This function returns true if all of the passed data elements are of the same type and value. One or more elements can be passed.

> [!NOTE]
> **Arma 3:** In Arma 3, see [isEqualTo](../commands/isEqualTo.md).

Note:
- This function is an improvement over the == operator because it can handle any data type in any combination.
- For arrays, it returns true if both arrays hold the same elements in the same order.
- If both values are undefined / nil / null, then this function will return true.

## Syntax

```sqf
[anything1, anything2, ..., anythingN] call BIS_fnc_areEqual
```

**Parameters:**

- `anythingM`: [Anything](../topics/Anything.md) - any data type

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

## Examples

### Example 1

```sqf
[0, "0"]        call BIS_fnc_areEqual; // false
[0, 1 + 1 - 2]    call BIS_fnc_areEqual; // true
[str 50, "50"]    call BIS_fnc_areEqual; // true
```

## Problems

EXTREMELY large strings (> 4k) or compiled code (from a file, for example) might not be properly compared if they are only different near the end of the file.

## See also

[isEqualTo](../commands/isEqualTo.md) · [BIS_fnc_areEqualNotNil](../functions/BIS_fnc_areEqualNotNil.md)

<sub>Source: [BI Community Wiki — BIS fnc areEqual](https://community.bistudio.com/wiki/BIS_fnc_areEqual) (revision 363456).</sub>
