On a side note... is it better to use

'structKeyExists(url, 'property_type')'

as opposed to

'isdefined('url.property_type')'


===========================================

The answer is a resounding "depends".  It depends on:

1) Version of Coldfusion
2) Whether or not the variable exists.
3) How many variables are in the url scope.

My main beef with isdefined is that it scope hunts and if the variable
is not defined it may take longer to return false.  Structkeyexists is a
bit more verbose about what you are looking for.  The fact of the matter
is you are talking a difference of milliseconds.  I have measured a
difference before, but I had to loop thousands of times for it to add up
and that isn't a very reliable test to compare a production app against.

Here's the general consensus on this kind of stuff:  Code what is the
easiest to read and maintain.  If you have a performance problem with
the code, address it at that time.

~Brad

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306266
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to