and much cleaner :)

-----Original Message-----
From: Dick Applebaum [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 4:07 PM
To: CF-Talk
Subject: Re: IIF vs if,else


Sure it can...


   <tr bgcolor="<cfif getitem.currentrow mod 2>blue<cfelse>white</cfif>">

At 3:40 PM -0700 6/26/01, Bruce Holm wrote:
>My understand, based on what an expert (seminar instructor) said was that
>yes, IIF is significantly slower than using CFIF and should be avoided if
>possible.  But there are cases where IIF can be used where CFIF can't.  For
>example, one way of alternating the highlight background color on table
rows
>uses IIF within the TD tag to pick the background color... something where
>CFIF can't be used.
>
>
>----- Original Message -----
>From: "Cameron" <[EMAIL PROTECTED]>
>To: "CF-Talk" <[EMAIL PROTECTED]>
>Sent: Tuesday, June 19, 2001 4:02 PM
>Subject: IIF vs if,else
>
>
>Ok, after a bit of testing... can anyone tell me what the advantage of IIF
>over if (<cfif> or if () {}), else (<cfelse> or else {}).
>
>I tested a simple block of code using IIF and <cfif><cfelse></cfif> & IIF
>ran twice as slow...
>
>I can't see any major advantage by using it... yeah, it is kinda similar to
>i = (true?1 : 2); in javascript but it's really slow case of the implicit
>evaluate() on each part. Would be better if it was implicit & made
explicit,
>IF NEEDED.
>
>Can anyone give me a decent reason why IIF is better that <cfif>?
>
>Cameron Junge
>Web Developer
>Strongnet
>[EMAIL PROTECTED]
>http://www.strongnet.co.nz
>Ph: +64 9 414 2492
>Fax: +64 9 414 2960
>
>"You play with a Mac until you break it,
>You play with a PC until it works."
>
>
>Archives: http://www.mail-archive.com/[email protected]/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=sts
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to