Isboolean - MACROMEDIA COLDFUSION 4.5-CFML LANGUAGE Reference

Cfml language reference
Table of Contents

Advertisement

Chapter 2: ColdFusion Functions

IsBoolean

Returns TRUE if value can be converted to a Boolean; otherwise, FALSE.
See also
Syntax
IsBoolean( value )
value
Any number or string.
Examples
<!--- This example shows the use of IsBoolean --->
<HTML>
<HEAD>
<TITLE>
IsBoolean Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<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" METHOD="POST">
<P>Enter an expression, and discover if
it can be evaluated to a Boolean value.
<INPUT TYPE="Text" NAME="TheTestValue" VALUE="1">
<INPUT TYPE="Submit" VALUE="Is it Boolean?" NAME="">
</FORM>
</BODY>
</HTML>
IsNumeric
and YesNoFormat.
391

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion 4.5

Table of Contents