OPERATORS

Logical not (.NOT. or !)

Reverse the value of a logical expression.

Syntax

Signature
.NOT. condition
!condition

Description

Reverse the value of a logical expression. Both spellings accept the same operand.

Example

Logical_not.prg
PROCEDURE Main()

   LOCAL cDay
   LOCAL lClosed

   FOR EACH cDay IN { "Fri", "Sat", "Sun", "Mon" }
      lClosed := cDay == "Sat" .OR. cDay == "Sun"
      IF .NOT. lClosed
         QOut( "Dispatch orders on " + cDay )
      ENDIF
   NEXT

   RETURN

Output