VBScript IsEmpty関数
完全な VBScript リファレンス
IsEmpty 関数は、指定された変数が初期化されているかどうかを示すブール値を返します。変数が初期化されていない場合は True を返し、それ以外の場合は False を返します。
構文
IsEmpty(expression)
| パラメータ | 説明 |
|---|---|
| expression | 必須。式(通常は変数名)。 |
例
例
<script type="text/vbscript">
Dim x
document.write(IsEmpty(x) & "<br />")
x=10
document.write(IsEmpty(x) & "<br />")
x=Empty
document.write(IsEmpty(x) & "<br />")
x=Null
document.write(IsEmpty(x))
</script>
Dim x
document.write(IsEmpty(x) & "<br />")
x=10
document.write(IsEmpty(x) & "<br />")
x=Empty
document.write(IsEmpty(x) & "<br />")
x=Null
document.write(IsEmpty(x))
</script>
上記の例の出力結果:
True
False
True
False
False
True
False
試してみる »
完全な VBScript リファレンス その他の拡張