<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>For the Developer &#187; ternary</title>
	<atom:link href="http://forthedeveloper.com/tag/ternary/feed/" rel="self" type="application/rss+xml" />
	<link>http://forthedeveloper.com</link>
	<description>By Developers, For Developers</description>
	<lastBuildDate>Tue, 20 Jul 2010 23:54:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>ColdFusion 9 Ternary Operator Fail</title>
		<link>http://forthedeveloper.com/2009/coldfusion-9-ternary-operator-fail/</link>
		<comments>http://forthedeveloper.com/2009/coldfusion-9-ternary-operator-fail/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 23:27:17 +0000</pubDate>
		<dc:creator>Randy Merrill</dc:creator>
				<category><![CDATA[adobe]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[cfml]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[operator]]></category>
		<category><![CDATA[ternary]]></category>

		<guid isPermaLink="false">http://forthedeveloper.com/?p=140</guid>
		<description><![CDATA[One of the things that I was really excited for in ColdFusion 9 was the support for the ternary operator. As Ben said: To me, the ternary operator is what the IIF() method call always wanted to be. Unfortuately I was testing some CFML code, written and working on Railo, on a ColdFusion 9 server [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things that I was really excited for in ColdFusion 9 was the support for the ternary operator. As <a href="http://www.bennadel.com/blog/1643-Learning-ColdFusion-9-The-Ternary-Operator.htm">Ben said</a>:</p>
<blockquote><p>To me, the ternary operator is what the IIF() method call always wanted to be.</p></blockquote>
<p>Unfortuately I was testing some CFML code, written and working on Railo, on a ColdFusion 9 server and had this error pop up:</p>
<blockquote><p><code>Unable to find an operator implementation for coldfusion.compiler.ASToperator</code></p></blockquote>
<p>Turns out the the ternary operator works great&#8230; unless you are using it in a default value for an argument. Fail.</p>
<p><span id="more-140"></span></p>
<p>Here is an example, that should run fine if the ternary operator was doing what it is supposed to:</p>
<pre style="padding-left: 30px;">&lt;cffunction name="testing" access="public" returntype="void" output="false"&gt;
	&lt;cfargument name="test" type="string" default="#(1 EQ 1 ? 'Hi' : 'Bye')#" /&gt;

	&lt;!--- Anything ---&gt;
&lt;/cffunction&gt;</pre>
<p>I have filed it as a bug if you would like to <a href="http://cfbugs.adobe.com/cfbugreport/flexbugui/cfbugtracker/main.html#bugId=80610">vote on the issue</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://forthedeveloper.com/2009/coldfusion-9-ternary-operator-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
