> Named: > <cfset setDSN(dsName:"myDatasourceName")> > or > <cfset setDSN(dsName="myDatasourceName")>
Aha! This I got immediately. I understand it all now and once we were both clear on what I was doing, it makes perfect sense both in what you were doing, and syntactically what you were writing. I've seen the lower named method in 99.99% of the examples that use that method, I don't honestly recall ever seeing the upper method used. But once I see what it is, it makes perfect sense. > Positional: > <cfset setDSN("myDatasourceName")> > > Any of the above is perfectly valid. I personally prefer named > arguments because it makes my calling code more explicit in that I > don't have to go open the CFC to see what the argument name is that > I'm passing in. ...and this makes a LOT of sense. It's something I'm going to start trying to look at closer. > Further, if you use positional argument notation and > the order of your arguments gets messed up, then you will be setting > the wrong values for each argument! ...again, another terrific reason... > I should note that many prefer > positional notation because it's just like Java, JavaScript, etc., > where you just pass in the value, and it keeps your coding guidelines > more consistent. Exactly! For me it was simply force of habit... > Hopefully this helps a bit more? TONS more...thanks so much! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188899 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