vbscript – CBool

FUNCTION:  CBool( )


Implemented in version 1.0

You can determine the expression subtype by using the function VarType( ).

CBool(Number)

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

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.

Code:
<% anynumber=7.77 %>
<% =CBool(anynumber) %>

Output:
True

Code:
<% notnumber=abc %>
<% =CBool(notnumber) %>

Output:
False

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Vous pouvez utiliser ces balises et attributs HTML : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>