> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Paul Roe > Sent: Tuesday, July 05, 2005 4:27 PM > To: [email protected]; [EMAIL PROTECTED] > Subject: [CFCDev] Functions local scope > > so forever i have been doing the following to make sure that I scope > local vars in my functions in my cfc's: > > <cfset var lcl = StructNew() /> > <cfset lcl.end = 10 /> > <cfloop from="1" to="#lcl.end#" index="lcl.i"> > etc.... > > While playing around today i noticed that the following also works: > > <cfset var $ = StructNew() /> > <cfset $.end = 10 /> > <cfloop from="1" to="#$.end#" index="$.i"> > > Can anyone see a good reason why I shouldn't use the $ to denote > locally scoped variables in functions?
I'd be more interested in hearing your reasons why you think you should. ;^) It just seems ugly to me. I would find it obtuse and confusing. It works because you can use a currency symbol as a variable name in CF - nothing more. There's nothing different or special about that. Jim Davis ---------------------------------------------------------- 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). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
