>>how can you argue that 20 is not a valid result from a
boolean _expression_?

Take this code:

<CFSET a = 20>
<CFIF a>a is true<CFELSE>a is not true</CFIF><BR>
<CFIF a EQ "yes">a is true<CFELSE>a is not true</CFIF><BR>
<CFIF a EQ true>a is true<CFELSE>a is not true</CFIF><BR>
<CFIF a IS true>a is true<CFELSE>a is not true</CFIF><BR>
<CFIF a EQ "no">a is false<CFELSE>a is not false</CFIF><BR>
<CFIF a EQ false>a is false<CFELSE>a is not false</CFIF><BR>
<CFIF a IS false>a is false<CFELSE>a is not false</CFIF><BR>

it shows:

a is true
a is not true
a is not true
a is not true
a is not false
a is not false
a is not false

It shows that a is considered as true if taken isolated, but it is neither EQ to "yes", neither to true, and neither IS true...
As a matter of fact, a is neither true nor false.

Is this normal? C'mon, there is something wrong here.
What's the difference?
The difference is that in <CFIF a>, a must be converted to a boolean value in order for the _expression_ to be evaluated, and this gives true because not 0.
BUT in all other expressions, a is not converted, it is just compared for its true value to another value, and definitely, its value is not considered as true by CF.

This clearly shows that 20 is CONVETED to true, but IS NOT equal to true.
Now, if 20 is neither EQ true neither EQ false, the only possible conclusion is that 20 is NOT a boolean value.
And if 20 is NOT a boolean value, in no way it should be the result of a boolean _expression_.

QED... ;-)

--
_______________________________________
See some cool custom tags here:
http://www.contentbox.com/claude/customtags/tagstore.cfm
Please send any spam to this address: [EMAIL PROTECTED]
Thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to