Arma 3 Scripting

Command in Variables

isEqualRef

Also available as Markdown and JSON, or read the original wiki page.

Description

Compares two values by reference, returns true if equal.

Syntax

val1 isEqualRef val2

Parameters:

Returns: Boolean - true if the same ref

Examples

Example 1

_arr1 = [1,[2,[3]]];
_arr2 = _arr1;
_arr1 isEqualTo _arr2;    // true
_arr1 isEqualRef _arr2;    // true

_arr2 = +_arr1;            // array copy
_arr1 isEqualTo _arr2;    // true
_arr1 isEqualRef _arr2;    // false

See also

isNotEqualRef · isEqualTo · Operators