2010-01-03 Zoltan Varga <vargaz@gmail.com>
[mcs.git] / docs / ecma334 / 14.10.2.xml
blob569d6920a8af9c19bbdef808d79a789ed840f264
1 <?xml version="1.0"?>
2 <clause number="14.10.2" title="Enumeration logical operators">
3   <paragraph>Every enumeration type E implicitly provides the following predefined logical operators: <code_example><![CDATA[
4 E operator &(E x, E y);  
5 E operator |(E x, E y);  
6 E operator ^(E x, E y);  
7 ]]></code_example></paragraph>
8   <paragraph>The result of evaluating x op y, where x and y are expressions of an enumeration type E with an underlying type U, and op is one of the logical operators, is exactly the same as evaluating (E)((U)x op (U)y). In other words, the enumeration type logical operators simply perform the logical operation on the underlying type of the two operands. </paragraph>
9 </clause>