VBScriptCBool関数_
❮完全なVBScriptリファレンスCBool関数は、式をブール型に変換します。
式は数値でなければなりません。
構文
CBool(expression)
Parameter | Description |
---|---|
expression | Required. Any valid expression. A nonzero value returns True, zero returns False. A run-time error occurs if the expression can not be interpreted as a numeric value |
例
例
<%
response.write(CBool(5) & "<br />")
response.write(CBool(0) & "<br />")
response.write(CBool(-5) & "<br />")
%>
上記のコードの出力は次のようになります。
True
False
True
❮完全なVBScriptリファレンス