IsBoolean

Description

Determines whether a value can be converted to Boolean

Returns

True, if the parameter can be converted to Boolean; False, otherwise.

Category

Decision functions

Function syntax

IsBoolean(value)

See also

IsNumeric, IsValid, YesNoFormat

Parameters

Parameter Description

value

Number or string

Example

<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 | KnowledgeBase | Bug Reporting

Version 7

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/7/htmldocs/00000516.htm