Please enable JavaScript to view this site.


Navigation: Macros > Macro Language > Operators

Test for Equality Operator (==)

Scroll Prev Up Next More

The operator == tests for equality between 2 expressions and returns true if both are equal, false otherwise.

bIsCentury = (nYear div 100) == 0
bSameAge = nAge1 == nAge2

Note that to improve legibility and avoid possible confusion between the = and the ==, it is customary to enclose a test for equality in parentheses

bIsCentury = ((nYear div 100) == 0)
bSameAge = (nAge1 == nAge2)

although the first examples are also perfectly valid.


Topic 121400, last updated on 18-Apr-2020