> In CFC, I always do this: > > <cffunction name = "something"> > <cfargument name="some" required="true" type="string"/> > <cfset var few = arguments.some/> <cfset few = 10/> </cffunction> > > If we should always scope our variables. Should I do this? > > <cfset var variables.few = arguments.some/> <cfset > variables.few = 10/>
I'm not sure what the point of this example is, anyway. Why would you require an argument, then immediately overwrite it? > The reason I re-set arguments.some to few is because I want > to type 3 letters instead of 14, but if I should always scope > my variables, then there is no point of resetting it. Yes, there's no point in storing one variable's value within another solely to avoid typing a scope identifier. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200145 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

