IsBoolean()

Determines if the object represents a boolean value

IsBoolean( value=any );

Returns: Boolean

Argument Description
value
any, required

Number or string

Examples

The following statements evaluate to true:

writeDump(IsBoolean( true ));
    writeDump(IsBoolean( false ));
    writeDump(IsBoolean( 0 ));
    writeDump(IsBoolean( -10.4 ));
    writeDump(IsBoolean( 3.6 ));
    writeDump(IsBoolean( "yes" ));
    writeDump(IsBoolean( "no" ));
    writeDump(IsBoolean( "true" ));
    writeDump(IsBoolean( "false" ));
    writeDump(IsBoolean( "0" ));
    writeDump(IsBoolean( "-10.4" ));
    writeDump(IsBoolean( "3.6" ));

The following statements evaluate to false:

writeDump(IsBoolean( Now() ));
    writeDump(IsBoolean( {} ));
    writeDump(IsBoolean( [] ));
    writeDump(IsBoolean( QueryNew('') ));
    writeDump(IsBoolean( "" ));
    writeDump(IsBoolean( "a string" ));

See also