| 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. |
- [CFCDev] reset Var Scoping? Ung, Seng
- Re: [CFCDev] reset Var Scoping? Chris Scott
- Re: [CFCDev] reset Var Scoping? Chris Scott
- RE: [CFCDev] reset Var Scoping? Peter Bell
- Re: [CFCDev] reset Var Scoping? Ryan Guill
- RE: [CFCDev] reset Var Scoping? Andrew Scott
- RE: [CFCDev] reset Var Scoping? Ung, Seng
