On Thu, 3 Mar 2005 13:54:45 -0000, Adrian Lynch <[EMAIL PROTECTED]> wrote: > I use structures to pass back multiple things from functions, but I'm not so > sure you're right about not using an array. An array maps to the > cfprocresult's resultset attribute(as it could equally to it's name attrib) > but with the array you don't need to know the name used only the number of > the resultset.
But returning an array causes the array to be *copied* (not a huge deal with only two entries but still...). An array doesn't give you nice names - it effectively requires calling code to know which order the two entries are in. It's much better from a maintenance point of view to use a struct with well-named keys. That way if you change the implementation of the CFC method, you can still return the two queries even if you move away from a SP with two result sets... (so the struct is better encapsulation because it hides the SP implementation). -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 49, yes 49, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197323 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

