Loathe wrote: > Ok, so here's something I never got. If variables.foo is private, what is
the unnamed/variables scope isn't "private" *within* the CFC. it's accessible to all methods. it's invisible to the caller though. the var scope is invisible to all other methods, ie it's private to the method it's used in. > var variables.foo? why on earth would you do that? first off you'd have to declare some variable, var variables.foo=1; would throw an invalid variable reference. and declaring a var scope variable would simply make it equal to the variables scope variable. variables.foo=1; var fubar=variables.foo; return fubar; would return 1. > What does var do? When/why would you use it? it makes a variable private to that method. why use it? so you don't shoot yourself in the nether regions when other methods are called that might use the same variable name or when that method is called in simultaneously (under a load). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236650 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

