Previous Next

ROUND function
Rounds a decimal expression to a specified number of places after the decimal point.
Syntax 
 
ROUND ( expression , precision )
expression
A decimal expression.
precision
A non-negative integer expression whose value is the number of places you want in the decimal result of the ROUND function.
Example 
This procedure increases all CreditLimit values by 10 percent, rounding those values to the nearest $100:
 
FOR EACH Customer:
  DISPLAY Customer.CustNum Customer.Name Customer.CreditLimit.
  Customer.CreditLimit = ROUND((Customer.CreditLimit * 1.1) / 100 ,0) * 100.
  PAUSE.
  DISPLAY Customer.CreditLimit.
END.
See also 
TRUNCATE function

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.