Thank you Dominic and Patrick for your suggestions.  In both cases, "i"
is var scoped just before the loops.

The version with <cfloop> is the one that's giving me trouble.  Perhaps
it's not in the loop syntax.  I've gone character by character comparing
the rest of the code in each function and they appear identical.

-----Original Message-----
From: Patrick Santora [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 15, 2008 8:18 AM
To: CF-Talk
Subject: Re: <cfscript> loop versus <cfloop>

you need to declare "i" via the script approach. cfloop does a basic
declaration for you. the for loop does not.

NOTE: if this loop is within a cffunction then ensure you have scoped i
correctly (place "var i = 1" above the loop)

or (i = 1; i LTE qNav.recordCount; i=i+1) {

               .........

}

-Pat
http://patweb99.avatu.com

On Tue, Apr 15, 2008 at 6:08 AM, Jason Durham <[EMAIL PROTECTED]>
wrote:

> I'm having a hard time tracking down the source of an error I'm
> receiving from a recursive function.  Are these loops identical?
>
>
>
> <cfloop from="1" to="#qNav.recordCount#" index="I">
>
>                ........
>
> </cfloop>
>
>
>
>
>
> for (; i LTE qNav.recordCount; i=i+1) {
>
>                .........
>
> }
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

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

Reply via email to