Previous Next

NOT operator
Returns TRUE if an expression is false, and FALSE if an expression is true.
Syntax 
 
NOT expression 
expression
A logical expression whose value is logical, that is TRUE/FALSE, YES/NO.
Example 
In this procedure, if the user enters the number of a Customer that does not exist, the procedure displays a message that the Customer does not exist and the user must try again. If the Customer does exist, the procedure displays the Name and Phone number of the Customer.
 
REPEAT:
  PROMPT-FOR Customer.CustNum.
  FIND Customer USING Customer.CustNum NO-ERROR.
  IF NOT AVAILABLE customer THEN DO:
    MESSAGE "Customer with CustNum:" INPUT Customer.CustNum
      " does not exist. Please try another.".
    UNDO, RETRY.
  END.
  ELSE 
    DISPLAY Customer.Name Customer.Phone.
END.
See also 
AND operator, OR operator

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.