Also, be cognitive that ColdFusion converts the words "yes" and "no" into
boolean equivalent 1 and 0.

For code legibility and maintainability, I would agree with Sean C. on this
point of not using implicit boolean conversion.

<cfif query.recordcount> logically will mean true for any returned records
or false for 0 records returned.  This is kind of inferred logic makes sense
to a ColdFusion developer.  ColdFusion converts the variables to a number
and then applies boolean logic against the 0 or non 0 number.

Now a more dfinitive result would be to to have  <cfif query.recordcount gt
0> and this is just comparing 0 or non 0 against a great than statement.
You are not coverting anything here other than comapring two numbers that
are of the same data type.

I would probably even go as far that non-implicit logic would make
ColdFusion's short-circuit boolean expressions quicker.

Teddy



On 9/13/06, Claude Schneegans <[EMAIL PROTECTED]> wrote:
>
> >>any positive integer evaluates as true in a Boolean expression.
>
> To be more exact: "any *non zero* integer evaluates as true in a Boolean
> expression.
> although recordcount here cannot be negative.
>
> --
> _______________________________________
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED])
> Thanks.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:253037
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to