VBScript » Functions » CBool

Version: 1.0

Syntax:
CBool(Number)

The CBool function converts any number to the variant of subtype Boolean.

Examples

Code:
<% anynumber=7.77 %>
<% =CBool(anynumber) %>
Output:
True
Language(s): VBScript
Code:
<% notnumber=abc %>
<% =CBool(notnumber) %>
Output:
False
Explanation:

The output for Boolean is either true or false. If the conversion is successful, the output will be true. If the conversion fails, the output will be false or an error message.

Language(s): VBScript

See Also: