expression * expressionThis 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.
DEFINE VARIABLE inv-value AS DECIMAL NO-UNDO LABEL "VALUE".FOR EACH Item NO-LOCK:inv-value = Item.OnHand * Item.Price.IF inv-value < 0 THENinv-value = 0.DISPLAY Item.ItemNum Item.ItemName Item.OnHand Item.Price inv-value.END.Multiplying two decimal expressions produces a DECIMAL value. Multiplying two INTEGER expressions produces an INTEGER value. Multiplying two INT64 expressions produces an INT64 value. Multiplying an integer expression (INTEGER or INT64) and a decimal expression produces a DECIMAL value. Multiplying an INTEGER expression and an INT64 expression produces an INT64 value.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |