xHarbour Reference Documentation > Operator Reference |
Logical OR operator (binary).
<lCondition1> .OR. <lCondition2>
The logical .OR. operator yields the result of a logical OR operation with left and right operand. The result is only .T. (true) when the value of one operand is also .T. (true), in all other cases the result is .F. (false).
When multiple .OR. operators appear in an expression, the result is already determined when one operand has the value .T. (true). In this case, remaining .OR. operators are not evaluated for optimization reasons. This so called shortcut optimization can be switched off using the compiler switch /z.
See also: | .AND., .NOT., | (bitwise OR) |
Category: | Logical operators , Operators |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// This example shows results of .OR. operations // using different operands: PROCEDURE Main ? .T. .OR. .T. // result: .T. ? .T. .OR. .F. // result: .T. ? .F. .OR. .T. // result: .T. ? .F. .OR. .F. // result: .F. RETURN
http://www.xHarbour.com