Progress
Language Reference


AND Operator

Interfaces
OS
SpeedScript
All
All
Yes

Returns a TRUE value if each logical expression is TRUE.

SYNTAX

expression AND expression 

expression

An expression that evaluates to a logical value (TRUE or FALSE).

EXAMPLE

This procedure lists all customers with credit limits between two values (supplied by the user and stored in the variables low-credit and hi-credit). The expressions credit-limit >= low-credit and credit-limit <= hi-credit are logical expressions because each yields a true or false value. Using the AND operator to join these logical expressions results in a logical expression that follows the WHERE keyword.

r-and.p
DEFINE VARIABLE low-credit LIKE credit-limit LABEL "Low Credit Limit".
DEFINE VARIABLE hi-credit LIKE credit-limit LABEL "High Credit Limit".

REPEAT:
  SET low-credit hi-credit WITH FRAME cr-range.
  FOR EACH customer WHERE
    (credit-limit >= low-credit) AND (credit-limit <= hi-credit):
      DISPLAY cust-num name credit-limit.
  END.
END. 

SEE ALSO

NOT Operator, OR Operator


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095