<?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: Conditional Statements: Switch Versus If/Else if/Else</title>
	<atom:link href="http://flashspeaksactionscript.com/conditional-statements/feed/" rel="self" type="application/rss+xml" />
	<link>http://flashspeaksactionscript.com/conditional-statements/</link>
	<description>Learn and Speak Actionscript</description>
	<lastBuildDate>Fri, 06 Jan 2012 16:55:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Angel</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-40826</link>
		<dc:creator>Angel</dc:creator>
		<pubDate>Thu, 30 Jul 2009 02:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-40826</guid>
		<description>Interesting...I haven&#039;t noticed any issues using Switch/Case. It&#039;s nice to know.</description>
		<content:encoded><![CDATA[<p>Interesting&#8230;I haven&#8217;t noticed any issues using Switch/Case. It&#8217;s nice to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jloa</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-40792</link>
		<dc:creator>Jloa</dc:creator>
		<pubDate>Tue, 28 Jul 2009 21:29:16 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-40792</guid>
		<description>First of all, i wouldn&#039;t recomend you use &quot;else if&quot;.
Always write single if states:
if(condition0)
 result0;
...
if(conditionN)
 resultN;

Speaking about the switch construction, it has lots of bugs. Beware to debug your whole application &#039;caused by one switch statement.

Loooooooots of bugs... I never use switch.
More info: 
http://bugs.adobe.com/jira/browse/ASC-3778
http://bugs.adobe.com/jira/browse/ASC-3644</description>
		<content:encoded><![CDATA[<p>First of all, i wouldn&#8217;t recomend you use &#8220;else if&#8221;.<br />
Always write single if states:<br />
if(condition0)<br />
 result0;<br />
&#8230;<br />
if(conditionN)<br />
 resultN;</p>
<p>Speaking about the switch construction, it has lots of bugs. Beware to debug your whole application &#8217;caused by one switch statement.</p>
<p>Loooooooots of bugs&#8230; I never use switch.<br />
More info:<br />
<a href="http://bugs.adobe.com/jira/browse/ASC-3778" rel="nofollow">http://bugs.adobe.com/jira/browse/ASC-3778</a><br />
<a href="http://bugs.adobe.com/jira/browse/ASC-3644" rel="nofollow">http://bugs.adobe.com/jira/browse/ASC-3644</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlithoz</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-38947</link>
		<dc:creator>Carlithoz</dc:creator>
		<pubDate>Wed, 03 Jun 2009 19:46:29 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-38947</guid>
		<description>Use switch when you want to easily enumerate the positive values the variable you are evaluating can take.</description>
		<content:encoded><![CDATA[<p>Use switch when you want to easily enumerate the positive values the variable you are evaluating can take.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shreehari</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-38108</link>
		<dc:creator>Shreehari</dc:creator>
		<pubDate>Wed, 20 May 2009 08:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-38108</guid>
		<description>Wat about default???</description>
		<content:encoded><![CDATA[<p>Wat about default???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neo</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-34429</link>
		<dc:creator>Neo</dc:creator>
		<pubDate>Wed, 25 Mar 2009 19:02:06 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-34429</guid>
		<description>Not really necessary to use switch because I can&#039;t do if (x !=0 ) with it and it doesn&#039;t allow me also to use multiple statements, so U can use switch if everything is equal, but when it comes for non-equality, U&#039;ve stuck.</description>
		<content:encoded><![CDATA[<p>Not really necessary to use switch because I can&#8217;t do if (x !=0 ) with it and it doesn&#8217;t allow me also to use multiple statements, so U can use switch if everything is equal, but when it comes for non-equality, U&#8217;ve stuck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flashdaweb</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-31898</link>
		<dc:creator>flashdaweb</dc:creator>
		<pubDate>Fri, 13 Feb 2009 17:12:16 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-31898</guid>
		<description>Well, I would definatelly use &#039;switch&#039; any time when I have more than 2 conditions to a single variable.
But, if + else if + else if + else is really the only way to go when condition should check 2, 3 or even more values.
Also, switch is more readable.
And. I prefer using ?: when  performing simple actions upon condition check.</description>
		<content:encoded><![CDATA[<p>Well, I would definatelly use &#8216;switch&#8217; any time when I have more than 2 conditions to a single variable.<br />
But, if + else if + else if + else is really the only way to go when condition should check 2, 3 or even more values.<br />
Also, switch is more readable.<br />
And. I prefer using ?: when  performing simple actions upon condition check.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angel</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-31724</link>
		<dc:creator>Angel</dc:creator>
		<pubDate>Wed, 11 Feb 2009 20:19:13 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-31724</guid>
		<description>Interesting!!</description>
		<content:encoded><![CDATA[<p>Interesting!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary Wilson</title>
		<link>http://flashspeaksactionscript.com/conditional-statements/#comment-31722</link>
		<dc:creator>Gary Wilson</dc:creator>
		<pubDate>Wed, 11 Feb 2009 19:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://flashspeaksactionscript.com/?p=3173#comment-31722</guid>
		<description>I really like one particular point about Switch statements that makes them well suited for some situations.  You can leave break statements out to allow the code to execute through multiple Case statements until a final break is found.  This can be handy under the right circumstance.  For example, say you are using a numeric variable called _alertLevel in a Switch with 1 being the lowest level and 3 being the highest.  Put the code in the Switch in reverse order where Case 3 is first.  Case 3 would turn on a sound for a siren (no break statement), Case 2 would turn on an animation of a light flashing (also, no break statement), and Case 1 would display a message saying &quot;Alert!&quot; with a break statement at the end.  When you go to alert level 1, only a message is displayed.  Going to alert level 2 would turn on a light and display the message.  Alert level 3 would turn on the siren sound, the light and display the message.  Funny thing is, I&#039;ve worked with career programmers who have used Switch statements for a decade or more and have never thought to use a Switch in this way.</description>
		<content:encoded><![CDATA[<p>I really like one particular point about Switch statements that makes them well suited for some situations.  You can leave break statements out to allow the code to execute through multiple Case statements until a final break is found.  This can be handy under the right circumstance.  For example, say you are using a numeric variable called _alertLevel in a Switch with 1 being the lowest level and 3 being the highest.  Put the code in the Switch in reverse order where Case 3 is first.  Case 3 would turn on a sound for a siren (no break statement), Case 2 would turn on an animation of a light flashing (also, no break statement), and Case 1 would display a message saying &#8220;Alert!&#8221; with a break statement at the end.  When you go to alert level 1, only a message is displayed.  Going to alert level 2 would turn on a light and display the message.  Alert level 3 would turn on the siren sound, the light and display the message.  Funny thing is, I&#8217;ve worked with career programmers who have used Switch statements for a decade or more and have never thought to use a Switch in this way.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Object Caching 391/395 objects using disk: basic

Served from: flashspeaksactionscript.com @ 2012-02-08 15:42:06 -->
