Caché Basic Reference
Round
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Returns a number rounded to a specified number of decimal places.
Synopsis
Round(expression[,numdecimalplaces])
Arguments
expression The numeric expression being rounded.
numdecimalplaces Optional — Number indicating how many places to the right of the decimal are included in the rounding. If omitted, expression rounded to an integer is returned.
Description
The Round function always rounds the number 5 up. Leading and trailing zeros are deleted.
Round returns expression rounded to:
Examples
The following example uses the Round function to round a number to three decimal places:
Dim MyVar, pi
pi = 3.14159
MyVar = Round(pi,3) ' MyVar contains 3.142.
Println MyVar
 
See Also