Progress
Language Reference


ROUND Function

Interfaces
OS
SpeedScript
All
All
Yes

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 credit-limit values by 10 percent, rounding those values to the nearest $100.

r-round.p
FOR EACH customer:
    DISPLAY cust-num name credit-limit.
    credit-limit = ROUND( (credit-limit * 1.1) / 100 ,0) * 100.
    PAUSE.
    DISPLAY credit-limit.
END. 

SEE ALSO

TRUNCATE Function


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