.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.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.