Round
ROUND(number[, fractionaldigits])
Description
ROUND returns a number that has been rounded to the specified number of decimal places. The required argument, number, is any valid numeric expression. The optional argument, fractionaldigits, is the number of decimal places included in the rounding; if fractionaldigits is not provided it defaults to 0 and ROUND returns integers.
Example
REM ROUND Example 'ROUNDroundsnumberstoagivendecimalplace DIM Pi, Pure, Ate Pi = ROUND(3.14159265, 4) PRINT Pi Pure = ROUND(99.4444, 2) PRINT Pure Ate = ROUND(SQR(69)) PRINT Ate
Output
3.1416 99.44 8
Related Items