The variables scope isn't local. It's global to CFC or to the page. On May 18, 2011, at 8:56 PM, "Eric Roberts" <ow...@threeravensconsulting.com> wrote:
> > So is there any real benefit in using or not using "variables." For local > variables? > > -----Original Message----- > From: Maureen [mailto:mamamaur...@gmail.com] > Sent: Wednesday, May 18, 2011 12:40 PM > To: cf-talk > Subject: Re: scoping > > > ALWAYS SCOPE!!!!! > > Especially if someone else might have to maintain the code someday. > > On Wed, May 18, 2011 at 9:51 AM, Eric Roberts > <ow...@threeravensconsulting.com> wrote: >> >> We had a discussion at work as to whether or not we should scope local >> vars with the "variables." scope since that is implied in a cfset. >> One camp says it is not needed because of the implicit scoping when >> using cfset...the other camp says it is better to tack on "variables." >> and make it explicit for security and readability. Any thoughts? >> >> Er > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344635 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm