Jeanmarie,

Another way is like this:

<cfset setVariable("SC"&x,listElement)>

Or for more cfscript purists:

<cfscript>
....loop here... {
        setVariable("SC"&x,listElement);
}

Regarding <cfset "SC#x#" = listEelment >:  Since this is an 'evaluation',
and I have heard that 'evaluations' cost more performance wise than using a
setVariable() with a concatenated variable name, I prefer to use the first
method I indicated above.  However, I can't confirm this performance issue,
although maybe someone else on the list has done some performance testing
with 'evaluations' and can comment on that.

Dave Phillips

-----Original Message-----
From: Jeanmarie Richardson [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2008 12:32 PM
To: CF-Talk
Subject: Re: Using CFLoop to Define Variables

Thanks Josh!! Not sure why I didn't try that :-)

>Try putting quotes around your variable:
>
><cfset "SC#x#" = listElement />
>
>-- Josh
>
>> 


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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310751
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