Funny notation with #

后端 未结 4 1991
臣服心动
臣服心动 2020-12-15 23:07

what does this mean?

if CDbl(Trim(Range(\"M\" & r).Text)) > 0# then...

what does the # do?? and what does cdbl do?

4条回答
  •  眼角桃花
    2020-12-15 23:22

    CDbl() convert an expression to a Double:

    A data type that holds double-precision floating-point numbers as 64-bit numbers in the range -1.79769313486231E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values.

    "#" is the "type-declaration character" for a Double. Following a number with this symbol means that it will treat the number as a double instead of trying to guess what exact variable type to use (it would likely have treated the 0 as a integer without this)

提交回复
热议问题