Saturday, March 27, 2010

Passing by Reference vs. Passing by Value in ColdFusion

I just received a great question from a former student regarding passing by reference vs. passing by value in ColdFusion.

I know in some languages you can choose whether you are passing by reference or by value. In CF, it is kind of tricky.

Basically, if you pass a simple value (regular variable or array) will be passing by value, but if you pass a complex object (cfc, struct, query, etc) you will be passing by reference.

I found this great blog posting from Ray Camden which explains it very well. Check it out!

No comments:

Post a Comment