Applies from Version: | WEBcnx 2024.1 | Applies to Version: |
Description
The EQUALS function checks if two or more parameters have equal values.
Syntax
EQUALS(value1, value2, value3...)
The EQUALS function takes the following parameters:
- value1 Required - The first value to compare
- value2 Required - The second value to compare
- value3, value4, value5, etc. Optional- Additional values to compare
Returns
A Boolean. True if all parameters are equal, false if not.
Remarks
- This will almost certainly return false if we mix and match different types (e.g. a number will never equal a string)
Examples
Expression | Description | Result |
---|---|---|
EQUALS(2, 1+1) | Determines whether the 2=1+1 | True |
EQUALS(3, 3+1) | Determines whether 3=3+1 | False |
EQUALS(2, 1+1, 4/2) | Determines whether 2=1+1 and 2=4/2 (and therefore whether 1+1=4/2) | True |
EQUALS(2, 1+1, 6/2) | Determines whether 2=1+1 and 2=6/2 (and therefore whether 1+1=6/2) | False |
EQUALS("2", 1+1) | Determines whether the string "2" equals 1+1 | False (Strings cannot equal Numbers) |