Preserves the positive or negative value of
a numeric expression. Do not confuse this operator with the addition
operator that you use to add expressions together.
Syntax
-
expression
- An expression whose value is numeric.
Example
In
the r-unpos.p example, the sign of CreditLimit is
preserved as is the sign of the sum of CreditLimit +
100. The unary positive is not necessary; it is used simply to document
the procedure, as shown:
r-unpos.p
DEFINE VARIABLE old-max NO-UNDO LIKE CreditLimit LABEL "Old Limit".
FOR EACH Customer:
old-max =+ Customer.CreditLimit.
Customer.CreditLimit =+ (Customer.CreditLimit + 100).
DISPLAY Customer.Name old-max Customer.CreditLimit.
END.
|