Value1 == Value2 Value1 == Value2

Value1

The first value to compare.

Value2

The second value to compare.

Returns

Logical Logical

Whether the first value is equal to the second value.

Returns whether the first value is equal to the second value. 2 == 32 == 3 returns FALSE, but 2 == 22 == 2 returns TRUE. "a" == "A""a" == "A" returns FALSE, because text string comparisons are case-sensitive (unlike the = operator, where text string comparisons are case-insensitive.)

Array behavior

When applied to arrays, this operator returns a single TRUE or FALSE value indicating whether their elements are identical.

This formula returns TRUE:

{ 2, 2 } == { 2, 2 }
{ 2; 2 } == { 2; 2 }

This formula returns FALSE:

{ 2, 2 } == { 2, 3 }
{ 2; 2 } == { 2; 3 }

The = operator works differently. This formula returns the array { TRUE, TRUE }{ TRUE; TRUE }:

{ 2, 2 } = { 2, 2 }
{ 2; 2 } = { 2; 2 }

This formula returns the array { TRUE, FALSE }{ TRUE; FALSE }:

{ 2, 2 } = { 2, 3 }
{ 2; 2 } = { 2; 3 }

The behavior of the = operator is useful particularly when used with the FILTER function. Refer to the = documentation for more information.

Records and tables

Two records are equal if their members of the same name are equal. The order of the members does not matter. Text strings in the members are compared in a case-sensitive manner.

RECORD (A: "a") == RECORD (A: "A") RECORD (A: "a") == RECORD (A: "A") returns FALSE, but RECORD (A: 1, B: 2) == RECORD (B: 2, A: 1) RECORD (A: 1; B: 2) == RECORD (B: 2; A: 1) returns TRUE.

Like arrays, two tables are compared as a whole, and the result is a single TRUE or FALSE value. TABLE (A: { 1, 2 }) == TABLE (A: { 1, 3 }) TABLE (A: { 1; 2 }) == TABLE (A: { 1; 3 }) returns FALSE.

Examples

2 == 3
2 == 3

Returns FALSE.

2 == 2
2 == 2

Returns TRUE.

"a" == "A"
"a" == "A"

Returns FALSE. Text string comparisons are case-sensitive.

"a" = "A"
"a" = "A"

Returns TRUE, as the = operator compares text strings in a case-insensitive manner.

"a" == "a"
"a" == "a"

Returns TRUE. Text string comparisons are case-sensitive.

{ 2, 2 } == { 2, 2 }
{ 2; 2 } == { 2; 2 }

Returns TRUE, because all pairs in the two arrays are equal to one another.

{ 2, 2 } == { 2, 3 }
{ 2; 2 } == { 2; 3 }

Returns FALSE, because not all pairs in the two arrays are equal to one another.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell