Variables passed to User Defined Functions (UDF’s) are passed by value – a copy is made and the data within the UDF is a copy, not the original, and so any changes made within the UDF will not affect the original data. However, this is not the case with queries or structures – these are passed by reference, and so any changes made within the UDF will change the original copies outside of the UDF. If you want to make changes to queries or structures within UDF’s (changes that are local only to the UDF) then you’ll need to copy the data first. (Applies to: ColdFusion 5)

Leave a Reply