IsBoolean()
Determines if the object represents a boolean value
IsBoolean( value=any );
Returns: Boolean
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
- Decision logic
- Booleans
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)