Movatterモバイル変換


[0]ホーム

URL:


はてラボはてな匿名ダイアリー
ようこそ ゲスト さんログインユーザー登録
< 上司ヅラする同僚をへ... |http://anond.hatelabo.jp/20150... >

2015-02-23

http://anond.hatelabo.jp/20150223114637

ちったぁ自分で調べろや。ろくなプログラマになれんぞ。

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 を返すのは以下のとき

から問題があるのはEmpty のほう。

VBE Glossary (Empty)

Empty

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 を返す。

Permalink |記事への反応(1) | 12:39

このエントリーをはてなブックマークに追加ツイートシェア

記事への反応 -

記事への反応(ブックマークコメント)

全てのコメントを見る

人気エントリ

注目エントリ

ログインユーザー登録
ようこそ ゲスト さん
Copyright (C) 2001-2025 hatena. All Rights Reserved.

[8]ページ先頭

©2009-2025 Movatter.jp