This always makes me laugh.

Why don't you make a page with CFIF, then run it

Now use IIF() and run it

What difference do you see in execution time? Bugger all.

If you make a big loop that calls IIF 1000 times then you may notice a
difference.

Also imagine this code

<select name = "bob" #IIF(name is bob, "'selected'","''")#>

Now do the same thing with CFIF/CFELSE, how messy is that.

Don't NOT use something just because some cycle counting freak tells you not
to because you must save every possible 1000th of a millisecond. At least
try it for yourself first.

-
Snake


-----Original Message-----
From: Mike Soultanian [mailto:[EMAIL PROTECTED] 
Sent: 24 July 2006 04:17
To: CF-Talk
Subject: Re: iif: am I understanding correctly?



Don't use iif()

Always use cfif/cfelse instead of iif(). It is significantly faster and more
readable.

Mike




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247467
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to