Progress
Language Reference


* Multiplication Operator

Interfaces
OS
SpeedScript
All
All
Yes

Multiplies two numeric expressions.

SYNTAX

expression * expression 

expression

An expression with a numeric value.

EXAMPLE

This procedure computes the value of the on-hand inventory for each item. If the on-hand inventory is negative, the procedure sets the inventory value to 0.

r-mult.p
DEFINE VARIABLE inv-value AS DECIMAL LABEL "VALUE".

FOR EACH item:
    inv-value = on-hand * price.
    IF inv-value < 0
    THEN inv-value = 0.
    DISPLAY item.item-num item-name on-hand price inv-value.
END. 

NOTE

Multiplying two decimal expressions produces a decimal value. Multiplying two integer expressions produces an integer value. Multiplying an integer expression and a decimal expression produces a decimal value.


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