Dom, Great example....
-----Original Message----- From: Dominic Watson [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2008 2:24 PM To: CF-Talk Subject: Re: CF functions question No, you absolutely should var that variable, persistant component or UDF or whatever and I always var my function and method variables (just lapsed in this silly example). This other silly example demonstrates why (run in a single template): <cffunction name="foo"> <cfset i = 100> <cfreturn 'bar'> </cffunction> <cfoutput> <cfset i = 1> <cfloop condition="i LT 10"> <cfset bar = foo()> #i#<br /> <cfset i = i + 1> </cfloop> </cfoutput> You'd expect the loop to loop 10 times but it doesn't. Var that variable in the function and it does. Dominic -- Blog it up: http://fusion.dominicwatson.co.uk ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:300335 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

