[thelist] No Escape from ColdFusion

Raymond Camden jedimaster at macromedia.com
Mon Aug 27 14:33:37 CDT 2001


> actually, i wouldn't make a udf to apply the changes to an entire
> structure.
> instead, i'd make a udf that applied the change to a single variable or
> simple value key of a structure.  the reason for this is performance and
> simplicity.
>
> if you build it to apply the replace to all keys of a structure then you
> have to also make sure to check that the value of the key is a
> simple value
> and not a complex one like an array or another structure.  additionally,

Well, that's not hard to do though, you do have access to IsSimpleValue().

However, yes, it would be better to write the udf to handle just the value
itself, not the entire structure.

If you do use the structure, and this applies to sending structs to udfs in
general, don't forget that a struct passed to a udf is passed by reference,
not by value. This applies to queries as well.

=======================================================================
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email    : jedimaster at macromedia.com
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda





More information about the thelist mailing list