Contents | Prev | Next

8.2.5.5 or (boolean)

Description

When the or operator has operands of boolean type then it performs boolean OR. The result of the operation is of boolean type and is equal to true if either operand is true, and false if both operands are false. By default short-circuit evaluation is used when performing the boolean OR (i.e. The left operand is evaluated first and if it is true then the right operand is not evaluated because the result of the operation must be true). A compiler option can be used to enable/disable short-circuit evaluation.

Example

   false or false   results in false
   false or true    results in true
   true  or false   results in true
   true  or true    results in true

Contents | Prev | Next