|
Master:
Got it. I learned a lot from all of
you....
Thanks
OK that being said, if you're desperate to do
something like simplify those local variable defs, you could do the following:
<cfset var locals = StructNew() />
<cfset var varNames = "a,b,c,d,e" />
<cfset var i = "" />
<cfloop list="#varNames#" index ="i">
<cfset
locals[i] = "" />
</cfloop>
One thing. a,b,c,d... Those variable names are going to be hard to follow
down the road!
On Feb 26, 2006, at 10:09 PM, Chris Scott wrote:
Local variables need to be defined at the top of
methods declarations, after any arguments, and before any other statements.
So no that would not work. You probably would not want to try to do
something like that anyway.
On Feb 26, 2006, at 9:48 PM, Ung, Seng wrote:
Instead of setting each local
variables one at a time.
<cfset var
a=""/> <cfset var b=""/> <cfset
var c=""/> <cfset var d=""/>
I was trying to do this... but
it does not worked? <cfset
tmpVar="a,b,c,d"> <cfloop list="#tmpVar#"
index="i"> <cfset var #i# =
""/> </cfloop> I wonder? can it be
done?
---------------------------------------------------------- You
are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words
'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by
CFCZone (www.cfczone.org) and
supported by CFXHosting (www.cfxhosting.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' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
|