Equality Operators

From RAD Studio
Jump to: navigation, search

Go Up to Binary Operators Index

There are two equality operators: == and !=. They test for equality and inequality between arithmetic or pointer values, following rules very similar to those for the relational operators.

Note: Notice that == and != have a lower precedence than the relational operators < and >, <=, and >=. Also, == and != can compare certain pointer types for equality and inequality where the relational operators would not be allowed.

The syntax is

equality-expression == relational-expression
equality-expression != relational-expression