Round
<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > Numeric functions > Round |
Description
Round a numeric value to a specified number of decimal places.
Syntax
n = Round(NumericExpression, nDecimals)
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
NumericExpression |
Numeric |
No |
The numeric value to be rounded |
nDecimals |
Numeric |
No |
Number of decimal places to return in the rounded number |
Remarks
ROUND function does not perform "common" rounding, but round-to-even method: 1.255 to 2 decimals is rounded as 1.26, while 1.245 to 2 decimals is rounded to 1.24 )
Restrictions
See also
Numeric functions, FIX, CEIL, INT, FRAC, RoundNM
Examples