On 4/13/05, Mark Kecko <[EMAIL PROTECTED]> wrote: > What's the difference b/t using the variables scope as you mentioned > below for my function variables and declaring my variables using var for > the query within the function (your excerpt below)?
A huge amount! 'var' declares a variable to exist just for the duration of the function call. 'variables' scope exists for the lifetime of the CFC instance itself. So if you store the CFC in 'application' scope, the 'variables' scope inside that CFC is kinda like 'application' scope. > <!--- local variables for function ---> > <cfset var id = 0/> > <cfset var name = ""/> If you do this, the variables id and name will not be available in other methods. Check out some of these entries on my blog for more information: http://www.corfield.org/blog/index.cfm?do=blog.entry&entry=E0815825-A540-CCDD-7F3105958EE9B3D1 http://www.corfield.org/blog/index.cfm?do=blog.entry&entry=E0814E99-A199-8E00-438428ECC95D821B http://www.corfield.org/blog/index.cfm?do=blog.entry&entry=E0813E2D-F6A5-6303-677BB0074D8A16DD The last entry refers to Rob Brooks-Bilson's blog but the entry has actually moved so you can check it out here: http://www.brooks-bilson.com/blogs/rob/index.cfm?mode=entry&entry=C2058CE1-D608-AED8-715863215E9F758B -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Save $10 Download ZoneAlarm Security Suite http://www.houseoffusion.com/banners/view.cfm?bannerid=66 Message: http://www.houseoffusion.com/lists.cfm/link=i:12:6733 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/12 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:12 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.12 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
