OPERATORS

Logical and (.AND.)

Return true when both logical operands are true.

Syntax

Signature
left .AND. right

Description

Return true when both logical operands are true. A false left operand skips evaluation of the right operand.

Example

Logical_and.prg
PROCEDURE Main()

   LOCAL aBins := { "Parts", "Returns" }
   LOCAL nBin

   FOR EACH nBin IN { 0, 1, 2, 3 }
      IF nBin >= 1 .AND. nBin <= Len( aBins ) .AND. aBins[ nBin ] == "Returns"
         QOut( "Send to inspection", nBin )
      ENDIF
   NEXT

   RETURN

Output