Determines whether a value can be converted to Boolean.
True, if value can be converted to Boolean; False, otherwise.
IsBoolean(value)
| Parameter | Description |
|---|---|
| value |
Number or string |
<h3>IsBoolean Example</h3>
<cfif IsDefined("FORM.theTestValue")>
<cfif IsBoolean(FORM.theTestValue)>
<h3>The expression <cfoutput>#DE(FORM.theTestValue)#</cfoutput> is
Boolean</h3>
<cfelse>
<h3>The expression <cfoutput>#DE(FORM.theTestValue)#</cfoutput> is not Boolean</h3>
</cfif>
</cfif>
<form action = "isBoolean.cfm">
<p>Enter an expression, and discover whether it can be evaluated to a
Boolean value.
<input type = "Text" name = "TheTestValue" value = "1">
<input type = "Submit" value = "Is it Boolean?" name = "">
</form>
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6
Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/functions-pt1126.htm