structCount(url) GT 0 <----
or
NOT structIsEmpty(url)
Relying on CF's implicit type conversion is generally a bad idea,
particularly when you're dealing with boolean values. There are just
way too many weirdnesses lurking in the shadows with boolean
conversions.
Of the two, I'd prefer the latter, since you don't care about the
actual count, just whether it's empty or not.
cheers,
barneyb
On 10/16/07, Michael Dinowitz <[EMAIL PROTECTED]> wrote:
> Is there any consensus in the community as to which to use when checking if a
> structure has content or not? I'm building a killer onError() handler and I
> need to remove structures that have no content. I'm leaning towards
> structcount() as I can do
> <cfif structcount(url)>
> rather than
> <cfif not structisempty(url)>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291225
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4