The only advantage would be if you, as a coder, prefer the IIF() format over
the <CFIF><CFELSE>... format. Where performance is an issue, stay away from
the use of ColdFusion's dynamic functions such as IIF() as performance will
definitely suffer.
Gary Groomer
----- 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/cf-talk@houseoffusion.com/
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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists