但在msdn里面确实有在第二个参数上用负数的例子呀,而且在这个函数的定义上写的第二个参数是long型的啊这是小弟在MSDN上复制下来的Rounds a number to a specified number of digits.SyntaxROUND(number,num_digits)Number is the number you want to round.Num_digits specifies the number of digits to which you want to round number.If num_digits is greater than 0 (zero), then number is rounded to the specified number of decimal places. If num_digits is 0, then number is rounded to the nearest integer. If num_digits is less than 0, then number is rounded to the left of the decimal point. ExamplesROUND(2.15, 1) equals 2.2ROUND(2.149, 1) equals 2.1ROUND(-1.475, 2) equals -1.48ROUND(21.5, -1) equals 20
Round函数
描述返回一个数值,该数值是按照指定的小数位数进行四舍五入运算的结果。语法Round(expression [,numdecimalplaces])Round函数语法有如下几部分:部分 描述
expression 必需的。要进行四舍五入运算的数值表达式。
numdecimalplaces 可选的。数字值,表示进行四舍五入运算时,小数点右边应保留的位数。如果忽略,则Round函数返回整数。
If num_digits is 0, then number is rounded to the nearest integer.
If num_digits is less than 0, then number is rounded to the left of the decimal point.
ExamplesROUND(2.15, 1) equals 2.2ROUND(2.149, 1) equals 2.1ROUND(-1.475, 2) equals -1.48ROUND(21.5, -1) equals 20
[email protected]