You must have copied the code straight off the page. The ticks that my blog
displays are blowing up CF.
Try this.

<cfscript>
        variables.foo = 1;
        out = IIf(variables.foo NEQ 1,"'aString1'","'aString2'");
        writeOutput(out); 
</cfscript>


Warmest Regards,
 
Phillip B. Holmes
http://phillipholmes.com
214-995-6175 (cell)




 

-----Original Message-----
From: Russ [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 23, 2006 1:11 AM
To: CF-Talk
Subject: RE: iif: am I understanding correctly?

I'm not too sure what you're trying to do in that article, but I couldn't
get it to compile... can you explain what you're doing?

Russ

> -----Original Message-----
> From: Phillip Holmes [mailto:[EMAIL PROTECTED]
> Sent: Sunday, July 23, 2006 1:59 AM
> To: CF-Talk
> Subject: RE: iif: am I understanding correctly?
> 
> Brad,
> 
> IIF() actually compiles down to a 'short-circuited' if in java.
> 
> Here is an article about how to use IIF() without having to use 
> evaluate()
> -
> "IIf() without Delayed Evaluation".
> 
> http://www.phillipholmes.com/?p=43
> 
> Warmest Regards,
> 
> Phillip B. Holmes
> http://phillipholmes.com
> 214-995-6175 (cell)
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Brad Wood [mailto:[EMAIL PROTECTED]
> Sent: Sunday, July 23, 2006 12:40 AM
> To: CF-Talk
> Subject: RE: iif: am I understanding correctly?
> 
> Hmm, I had always just figured that cfif and iif just compiled down to 
> the exact same java anyway...
> 
> I wonder if one could have an advantage over the other if the 
> condition was either true or false....  all this worrying over a few 
> microseconds
> :)
> 
> ~Brad
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.10.1/390 - Release Date: 
> 7/17/2006
> 
> 
> 
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:247422
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