<?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: Function Variables</title>
	<atom:link href="http://jacksondunstan.com/articles/247/feed" rel="self" type="application/rss+xml" />
	<link>http://jacksondunstan.com/articles/247</link>
	<description>Mastering AS3</description>
	<lastBuildDate>Mon, 14 May 2012 17:02:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/247/comment-page-1#comment-496</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Wed, 10 Feb 2010 18:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=247#comment-496</guid>
		<description>Good point. You&#039;re spot on in this clarification.</description>
		<content:encoded><![CDATA[<p>Good point. You&#8217;re spot on in this clarification.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sindisil</title>
		<link>http://jacksondunstan.com/articles/247/comment-page-1#comment-493</link>
		<dc:creator>Sindisil</dc:creator>
		<pubDate>Wed, 10 Feb 2010 14:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=247#comment-493</guid>
		<description>Actually, block scoped local variables are allowed in C89 (aka ANSI C), as well.

In fact, though my 1st Ed. K&amp;R isn&#039;t at hand to check, I seem to remember that C has &lt;b&gt;always&lt;/b&gt; allowed block scoped local variables.

C does require the declarations to be at the &lt;strong&gt;top&lt;/strong&gt; of the block, though.

What C99 added was local variables with less than block scope, as in C++. In other words, the ability to declare a variable right before use. Local variable&#039;s scope is then from the point of declaration to the end of the innermost containing block.

Sorry for the post necromancy, but you&#039;ve got a valuable blog here &amp; I though this correction might be useful to a new reader.</description>
		<content:encoded><![CDATA[<p>Actually, block scoped local variables are allowed in C89 (aka ANSI C), as well.</p>
<p>In fact, though my 1st Ed. K&amp;R isn&#8217;t at hand to check, I seem to remember that C has <b>always</b> allowed block scoped local variables.</p>
<p>C does require the declarations to be at the <strong>top</strong> of the block, though.</p>
<p>What C99 added was local variables with less than block scope, as in C++. In other words, the ability to declare a variable right before use. Local variable&#8217;s scope is then from the point of declaration to the end of the innermost containing block.</p>
<p>Sorry for the post necromancy, but you&#8217;ve got a valuable blog here &amp; I though this correction might be useful to a new reader.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/247/comment-page-1#comment-28</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Wed, 16 Sep 2009 20:17:59 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=247#comment-28</guid>
		<description>As a C99/C++ programmer, I really miss block-level scoping. I don&#039;t know why they didn&#039;t do as you suggest and handle it in the compiler. After all, there is no block-level scoping in the x86 machine code C/C++ compiles down to, so I don&#039;t think Adobe has much of an excuse here.</description>
		<content:encoded><![CDATA[<p>As a C99/C++ programmer, I really miss block-level scoping. I don&#8217;t know why they didn&#8217;t do as you suggest and handle it in the compiler. After all, there is no block-level scoping in the x86 machine code C/C++ compiles down to, so I don&#8217;t think Adobe has much of an excuse here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Troy Gilbert</title>
		<link>http://jacksondunstan.com/articles/247/comment-page-1#comment-23</link>
		<dc:creator>Troy Gilbert</dc:creator>
		<pubDate>Wed, 16 Sep 2009 20:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=247#comment-23</guid>
		<description>C originally worked this way. I believe it was C99 (and C++) that first allowed block-level scope.

From what I understand, at the bytecode level there is no block-level scope, thus AS3 reflects that literally (even though I do know the compiler could handle that detail for us internally).</description>
		<content:encoded><![CDATA[<p>C originally worked this way. I believe it was C99 (and C++) that first allowed block-level scope.</p>
<p>From what I understand, at the bytecode level there is no block-level scope, thus AS3 reflects that literally (even though I do know the compiler could handle that detail for us internally).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackson</title>
		<link>http://jacksondunstan.com/articles/247/comment-page-1#comment-13</link>
		<dc:creator>jackson</dc:creator>
		<pubDate>Wed, 16 Sep 2009 17:49:10 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=247#comment-13</guid>
		<description>Thanks for the link. It&#039;s good to see that Adobe has at least documented what is going on. I still wonder &lt;em&gt;why&lt;/em&gt; they chose to do this though. I find that it is almost always more confusing and more error prone than block-level scoping.</description>
		<content:encoded><![CDATA[<p>Thanks for the link. It&#8217;s good to see that Adobe has at least documented what is going on. I still wonder <em>why</em> they chose to do this though. I find that it is almost always more confusing and more error prone than block-level scoping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Penner</title>
		<link>http://jacksondunstan.com/articles/247/comment-page-1#comment-12</link>
		<dc:creator>Robert Penner</dc:creator>
		<pubDate>Wed, 16 Sep 2009 17:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://jacksondunstan.com/?p=247#comment-12</guid>
		<description>AS3 hoists variable declarations to the top of the function:

http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9d.html</description>
		<content:encoded><![CDATA[<p>AS3 hoists variable declarations to the top of the function:</p>
<p><a href="http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9d.html" rel="nofollow">http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f9d.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

