xHarbour Reference Documentation > Operator Reference xHarbour Developers Network  

.NOT.

Logical NOT operator (unary).

Syntax

! <lCondition>
.NOT. <lCondition>

Arguments

<lCondition>
<lCondition> is a logical expression to logically negate.

Description

The .NOT. operator (alternatively "!" as an abbreviation) is a unary logical operator that negates the value of its operand. This yields the logical inverse of <lCondition>.

Info

See also:.AND., .OR.
Category: Logical operators , Operators
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example shows the logical inverse of the operands:

   PROCEDURE Main
      ? .NOT. (.T.)                    // result: .F.
      ? .NOT. (.F.)                    // result: .T.

      ? ! 1 > 2                        // result: .T.
  RETURN

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe