Test for Equality (==)

Navigation:  Appendices > Macro Language > Operators >

Test for Equality (==)

Previous pageReturn to chapter overviewNext page

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 updated on 17-Mar-2001.
Topic URL: http://www.qppstudio.net/webhelp/index.html?strictequality.htm