IsNumeric Function (Visual Basic)
IsNumeric returns True if the data type ofExpression is Boolean,Byte, Decimal,Double, Integer, Long, SByte, Short, Single, UInteger, ULong, or UShort, or anObject that containsone of those numeric types.It also returns True ifExpression is aChar orString that can be successfully converted to anumber.
ここは普通のことをいっている。 IsNumeric が True を返すのは以下のとき。
Indicates that no beginning valuehas beenassigned to a Variant variable. AnEmpty variable is representedas 0 in a numeric context or azero-lengthstring ("") in astring context.
Empty は context にあわせて以下のように解釈される。
というわけで IsNumeric(Empty) はEmpty が数値として解釈されて 0 になるので True を返す。
なんでだよ!!
ちったぁ自分で調べろや。ろくなプログラマになれんぞ。 IsNumeric Function (Visual Basic) IsNumeric returns True if the data type of Expression is Boolean, Byte, Decimal, Double, Integer, Long, SByte, Short, Single, UInteger...
わざわざどうもありがとう!! Emptyの(仕様うんぬん以前の)概念は、数字のゼロでもあり空文字列でもあり、空っぽである「何でも型」、何でも入るけど空っぽな器といった感じなん...