Round DataWindow expression function
Description
Rounds a number to the specified number of decimal places.
Syntax
1 |
<span>Round</span> ( <span>x</span> , <span>n</span> ) |
Argument |
Description |
---|---|
x |
The number you want to round. |
n |
The number of decimal places to which |
Return Values
Decimal. If n is positive, Round returns x rounded
to the specified number of decimal places. If n is
negative, it returns x rounded to (- n +1)
places before the decimal point. Returns –1 if it fails.
Examples
This expression returns 9.62:
1 |
<span>Round</span>(9.624, 2) |
This expression returns 9.63:
1 |
<span>Round</span>(9.625, 2) |
This expression returns 9.600:
1 |
<span>Round</span>(9.6, 3) |
This expression returns -9.63:
1 |
<span>Round</span>(-9.625, 2) |
This expression returns -10:
1 |
<span>Round</span>(-9.625, -1) |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments