> Ok, after a bit of testing... can anyone tell me what the
> advantage of IIF over if ( or if () {}), else (
> or else {}).
>
> I tested a simple block of code using IIF and
> & IIF ran twice as slow...
>
> I can't see any major advantage by using it... yeah, it is
> kinda similar to i = (
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...
At 3:40 PM -0700 6/26/01, Bruce Holm wrote:
>My understand, based on what an expert (semi
Sure it can...
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
>exam
#line_num#
--
-Original Message-
From: Bruce Holm [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 3:40 PM
To: CF-Talk
Subject: Re: IIF vs if,else
My understand, based on what an expert (seminar instructor) said was that
yes, IIF is significantly slower
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 ro
On 6/20/01, Cameron penned:
>if () {}), else ( or else {}).
>
>I tested a simple block of code using IIF and
>& 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 ev
it's not. I've never found a reason to use IIF over CFIF. It's only saving
grace is that when you are using an IF statement to set attributes inside a
tag (like CLASS=), IIF won't cause Studio to screw up the color scheme
of your code.
;)
B
Note - this was written in 1280 x 1024 maximized. This will probably not
look too great on smaller resolutions. I suggest copying this to notepad
and turning wordwrap off to view properly...
Iif can reduce the amount of code you need to write.
For example:
Vs
Keep in
The only advantage would be if you, as a coder, prefer the IIF() format over
the ... 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" <[E
Cameron, it's well known that IIF is much slower. As far as I know, the
only real advantage to using it is that it's useful in some cases because
you can write less code, which can be easier to read. And it is useful if
you actually need to return some evaluated expression.
Avi
At 11:02 AM 6/
IIF is much slower than a standard CFIF. 'nuff said.
Ok, after a bit of testing... can anyone tell me what the advantage of IIF
over if ( or if () {}), else ( or else {}).
I tested a simple block of code using IIF and & IIF
ran twice as slow...
I can't see any major advantage by using it... y
11 matches
Mail list logo