It comes down to the issue of CF not being a typed language. There are
advantages, and disadvantages. What exactly constitutes a boolean is sort of
up in the air in CF, since the language isn't really typed in the first
place, technically CF has no true boolean datatype.
While 0 = false for boolean evaluations in CF, the keywords true & false
actually evaluate to the strings "true" and "false", and I'm willing to bet
that's how CF handles it behind the scenes as well, because I did some
performance testing with the true/false keywords a while back and even in MX
<cfif myVar EQ true> is much slower than <cfif myVar EQ 1>.
I think the whole issue of how to implement booleans, and datatypes in
general should be revisited in future versions of CF. The issue is really
confused as it stands.

<cfset t = true>
<cfset f = false>

<cfoutput>
true = #t#<br>
false = #f#
</cfoutput>

jon
----- Original Message -----
From: "Christopher Olive" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 3:30 PM
Subject: RE: Writing efficient CFIF statements


> We're getting mired in semantics.  We're technically both correct.
>
> <Dons asbestos boxers>
> but we can continue the conversation, if you like. :)
> </Dons asbestos boxers>
>
>
> -----Original Message-----
> From: Hal Helms [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 10:50 AM
> To: CF-Talk
> Subject: RE: Writing efficient CFIF statements
>
>
> A Boolean value is a logical TRUE or FALSE. In some languages, this is
> represented as 0 and 1 or 0 and non-zero, but that's an implementation
> detail.
>
> -----Original Message-----
> From: Christopher Olive [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 16, 2002 10:33 AM
> To: CF-Talk
> Subject: RE: Writing efficient CFIF statements
>
>
> but it IS a boolean.  1 and 0 are boolean yes and no (in most
> languages).
>
> chris olive


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to