.OR. Logical OR

.OR.
 Logical OR--binary                              (Logical)
------------------------------------------------------------------------------
 Syntax

     <lCondition1> .OR. <lCondition2>

 Type

     Logical

 Operands

     <lCondition1> and <lCondition2> are logical expressions.

 Description

     The .OR. operator is a binary logical operator that executes a logical
     OR operation using the following modified Boolean rules:

     .  Returns true (.T.) if either <lCondition1> or <lCondition2>
        evaluates to true (.T.)

     .  Returns false (.F.) if both <lCondition1> and <lCondition2>
        evaluates to false (.F.)

     Warning!  In a departure from the Summer '87 and other dialect
     behavior, Clipper shortcuts the evaluation of .OR. operands.  This
     means that <lCondition1> and <lCondition2> are both evaluated only when
     <lCondition1> evaluates to false (.F.).  If <lCondition1> evaluates to
     true (.T.), the .OR. operation is true (.T.) and <lCondition2> is,
     therefore, not evaluated.  For backward compatibility, shortcutting can
     be suppressed by compiling with the /Z option.

 Examples

     .  This example shows .OR. results using different operands:

        ? .T. .OR. .T.            // Result: .T.   (shortcut)
        ? .T. .OR. .F.            // Result: .T.   (shortcut)
        ? .F. .OR. .T.            // Result: .T.
        ? .F. .OR. .F.            // Result: .F.

See Also: .AND. .NOT.

 

.NOT. Logical NOT

.NOT.
 Logical NOT--unary                              (Logical)

 Syntax

     ! <lCondition>
     .NOT. <lCondition>

 Type

     Logical

 Operands

     <lCondition> is a logical expression to not.

 Description

     The not (!) operator is a unary logical operator that returns the
     logical inverse of <lCondition>.

 Examples

     .  This example shows .NOT. results using different operands:

        ? ! (.T.)               // Result: .F.
        ? ! 1 > 2               // Result: .T.
        ? .NOT. 1 > 2           // Result: .T.

See Also: .AND. .OR.

 

.AND. Logical AND

.AND.
 Logical AND--binary                             (Logical)
------------------------------------------------------------------------------
 Syntax

     <lCondition1> .AND. <lCondition2>

 Type

     Logical

 Operands

     <lCondition1> and <lCondition2> are logical expressions to AND.

 Description

     The .AND. operator is a binary logical operator that executes a logical
     AND operation using the following modified Boolean rules:

     .  Returns true (.T.) if both <lCondition1> and <lCondition2>
        evaluate to true (.T.)

     .  Returns false (.F.) if either <lCondition1> and <lCondition2>
        evaluate to false (.F.)

     Warning!  In a departure from Summer '87 and other dialect behavior,
     Clipper shortcuts the evaluation of .AND. operands.  This means that
     <lCondition1> and <lCondition2> are both evaluated only when
     <lCondition1> evaluates to TRUE (.T.).  If <lCondition1> evaluates to
     FALSE (.F.), the .AND. operation is FALSE (.F.) and <lCondition2> is
     therefore not evaluated.

     For backward compatibility, shortcutting can be suppressed by compiling
     with the /Z option.

 Examples

     .  This example shows .AND. results using different operands:

        ? .T. .AND. .T.            // Result: .T.
        ? .T. .AND. .F.            // Result: .F.
        ? .F. .AND. .T.            // Result: .F.   (shortcut)
        ? .F. .AND. .F.            // Result: .F.   (shortcut)


See Also: .NOT. .OR.