VBScript CBool 函数
❮ VBScript 参考大全CBool 函数将表达式转换为 Boolean 类型。
表达式必须是一个数值。
语法
CBool(expression)
参数 | 描述 |
---|---|
expression | 必需。任何有效表达式。非零值返回 True,零返回 False。如果表达式无法解释为数值,则会发生运行时错误。 |
示例
示例
<%
response.write(CBool(5) & "<br />")
response.write(CBool(0) & "<br />")
response.write(CBool(-5) & "<br />")
%>
上面代码的输出将是
True
False
True
显示示例 »
❮ VBScript 参考大全