Title: Message

The only thing wrong with this code is that you where resetting to the var scope once it is declared as var it doesn’t matter anymore.

 

So this

 

 <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>

 

 

Would become

 

 <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 “#i#” = ""/>
 </cfloop>

 

 

 

 

Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976


Quote:
...the myth of socialism is far stronger than the reality of capitalism. That is because capitalism is not really an ism at all. It is what people do if you leave them alone. - Arnold Beichmen, Hoover Institute Fellow
------------------------------------------------------------------------------------------------------


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ung, Seng
Sent: Monday, 27 February 2006 1:48 PM
To: CFCDev@cfczone.org
Subject: [CFCDev] reset Var Scoping?

 

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 cfcdev@cfczone.org 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/cfcdev@cfczone.org ----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to cfcdev@cfczone.org 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/cfcdev@cfczone.org

Reply via email to