D Simcik wrote:
> I'm using it to declare variables at the top of my CFC's, but I am wondering 
> really when/why this should scope be used as a best practice. 

Not at the top of your CFC's but at the top of each function in the CFC 
for all variables you want to be local to that function.  The VAR 
declaration creates private variables for the function so that they do 
not get mixed up with variables of the same name in other functions 
and|or the variables scope.  The variables scope is basically the global 
private scope of the entire CFC and is shared by all functions of the 
component.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301345
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to