<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: C Conditional Operator aka Ternary Operator</title>
	<atom:link href="http://iPhoneDeveloperTips.com/c/c-conditional-operator-aka-ternary-operator.html/feed" rel="self" type="application/rss+xml" />
	<link>http://iPhoneDeveloperTips.com/c/c-conditional-operator-aka-ternary-operator.html</link>
	<description>Tips and Tricks for iPhone developers</description>
	<lastBuildDate>Thu, 29 Jul 2010 23:00:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Tracy</title>
		<link>http://iPhoneDeveloperTips.com/c/c-conditional-operator-aka-ternary-operator.html/comment-page-1#comment-9516</link>
		<dc:creator>Tracy</dc:creator>
		<pubDate>Thu, 11 Feb 2010 20:03:30 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=5244#comment-9516</guid>
		<description>It&#039;s a favorite of mine too, and I often use it for more complicated assignments that would otherwise require multiple if-else expressions. I prefer this layout for easy reading:

str = x &gt; 0 ? @&quot;positive&quot; 
      : x &lt; 0  ? @&quot;negative&quot;
                   :  @&quot;zero&quot;;</description>
		<content:encoded><![CDATA[<p>It&#8217;s a favorite of mine too, and I often use it for more complicated assignments that would otherwise require multiple if-else expressions. I prefer this layout for easy reading:</p>
<p>str = x &gt; 0 ? @&#8221;positive&#8221;<br />
      : x &lt; 0  ? @&quot;negative&quot;<br />
                   :  @&quot;zero&quot;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Pasqualetti</title>
		<link>http://iPhoneDeveloperTips.com/c/c-conditional-operator-aka-ternary-operator.html/comment-page-1#comment-8646</link>
		<dc:creator>Joe Pasqualetti</dc:creator>
		<pubDate>Wed, 13 Jan 2010 02:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=5244#comment-8646</guid>
		<description>Nice post! Filing as &quot;ternary refresher&quot;.</description>
		<content:encoded><![CDATA[<p>Nice post! Filing as &#8220;ternary refresher&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steff</title>
		<link>http://iPhoneDeveloperTips.com/c/c-conditional-operator-aka-ternary-operator.html/comment-page-1#comment-8625</link>
		<dc:creator>Steff</dc:creator>
		<pubDate>Tue, 12 Jan 2010 07:44:33 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=5244#comment-8625</guid>
		<description>Love this operator as well! It&#039;s in fact the only operator with three operands (hence the name :-). Some might argue that they don&#039;t use it for code-readability&#039;s sake but if you know what the operator does you can figure out the code just as quick as an if-else expression. I wouldn&#039;t nest them however.

Regards,
Steff</description>
		<content:encoded><![CDATA[<p>Love this operator as well! It&#8217;s in fact the only operator with three operands (hence the name :-). Some might argue that they don&#8217;t use it for code-readability&#8217;s sake but if you know what the operator does you can figure out the code just as quick as an if-else expression. I wouldn&#8217;t nest them however.</p>
<p>Regards,<br />
Steff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michelle</title>
		<link>http://iPhoneDeveloperTips.com/c/c-conditional-operator-aka-ternary-operator.html/comment-page-1#comment-8620</link>
		<dc:creator>Michelle</dc:creator>
		<pubDate>Tue, 12 Jan 2010 05:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://iPhoneDeveloperTips.com/?p=5244#comment-8620</guid>
		<description>I like the ternary operator for two reasons.  First, it&#039;s a good way to do conditional assignment on the same line as the definition of the variable that gets the result.  Second, it&#039;s a good way to cut down on curly brackets, as an alternative to the horrid practice of nesting a single conditional line below the condition without brackets.  The one drawback is the increased difficulty of inserting breakpoints on the individual conditions.</description>
		<content:encoded><![CDATA[<p>I like the ternary operator for two reasons.  First, it&#8217;s a good way to do conditional assignment on the same line as the definition of the variable that gets the result.  Second, it&#8217;s a good way to cut down on curly brackets, as an alternative to the horrid practice of nesting a single conditional line below the condition without brackets.  The one drawback is the increased difficulty of inserting breakpoints on the individual conditions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
