Export (0) Print
Expand All

7.10 Logical operators

Visual Studio .NET 2003

The &, ^, and | operators are called the logical operators.

and-expression:
equality-expression
and-expression   &   equality-expression
exclusive-or-expression:
and-expression
exclusive-or-expression   ^   and-expression
inclusive-or-expression:
exclusive-or-expression
inclusive-or-expression   |   exclusive-or-expression

For an operation of the form x op y, where op is one of the logical operators, overload resolution (Section 7.2.4) is applied to select a specific operator implementation. The operands are converted to the parameter types of the selected operator, and the type of the result is the return type of the operator.

The predefined logical operators are described in the following sections.

Show:
© 2014 Microsoft