Nice solution Jim. But put the var key in all function local variables
sux, I hope this will be fixex in blackstone and the issue of declare
them at beginning.


On Fri, 3 Sep 2004 18:06:08 -0400, Jim Davis
<[EMAIL PROTECTED]> wrote:
> Absolutely.
> 
> For me I find it easiest to define a "local" struct at the beginning of any
> method and then just set all vars as keys of it.  Something like this:
> 
> <cffunction ...>
> 
>        <cfset var local = structNew() />
> 
>        <cfset local.Start = 1 />
>        <cfset local.End = 10 />
> 
>        <cfloop from="#local.Start#" to="#local.end#" index="#local.Cnt#">
> 
>        </cfloop>
> 
> </cffunction>
> 
> That way you don't have to remember to create all of your loop index
> variables at the top of the function (although it's not a bad thing to
> declare all your variables first either).
> 
> Jim Davis
> 
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> > Of John Blayter
> > Sent: Friday, September 03, 2004 5:44 PM
> > To: [EMAIL PROTECTED]
> > Subject: [CFCDev] CFC var question
> >
> > I am just wondering if you need to var the index of a CFLOOP inside a CFC?
> >
> > So if I have
> >
> > <cfloop list="#mylist#" index="x">
> >     <!--- Loop stuff goes here --->
> > </cfloop>
> >
> > Do I need to have a <cfset var x = ""> to be thread safe?
> >
> > -------------------------------
> > John Blayter
> > [EMAIL PROTECTED]
> > http://john.blayter.com/
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email
> > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> > in the message of the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > by Mindtool, Corporation (www.mindtool.com).
> >
> > An archive of the CFCDev list is available at www.mail-
> > archive.com/[EMAIL PROTECTED]
> 
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev'
> in the message of the email.
> 
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> 
> An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
> 



-- 
Xavi (http://xavicl.blogspot.com)
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to