Progress
Language Reference


– Subtraction Operator

Interfaces
OS
SpeedScript
All
All
Yes

Subtracts one numeric expression from another numeric expression.

SYNTAX

expression - expression 

expression

An expression with a numeric value.

EXAMPLE

This procedure determines the amount of inventory available by subtracting the amount allocated from the total on hand.

r-subt.p
DEFINE VARIABLE free-stock LIKE on-hand LABEL "Free Stock".

FOR EACH item:
  free-stock = on-hand - allocated.
  DISPLAY item-num item-name on-hand allocated free-stock.
END. 

NOTE

Subtracting one decimal expression from another produces a decimal value. Subtracting one integer expression from another produces an integer. Subtracting an integer expression from a decimal expression (or subtracting a decimal expression from an integer expression) produces a decimal value.


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