<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using undefined variables in JScript</title><link>http://blogs.msdn.com/b/ericlippert/archive/2006/05/04/590030.aspx</link><description>I got a question the other day pointing out that in JScript, it is legal to assign a value to an undeclared variable, and the variable kind of gets implicitly declared for you, but it is not legal to read the value of an undeclared variable. The writer</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Using undefined variables in JScript</title><link>http://blogs.msdn.com/b/ericlippert/archive/2006/05/04/590030.aspx#591328</link><pubDate>Sat, 06 May 2006 09:05:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:591328</guid><dc:creator>Eric Lippert</dc:creator><description>1) Not to my knowledge, but I am on neither the IE nor the scripting teams anymore, so I am not privy to their strategic or tactical planning. &lt;br&gt;&lt;br&gt;2) No, it is not deprecated to my knowledge, and I am hoping that we will be making it a higher priority to invest in JScript .NET in several areas -- I would also like to see JS.NET on the IE client, as well as support for e4x features and new CLR features such as generics. &amp;nbsp;However, note that this is my personal hope, and not based on any information one way or the other, see #1.&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=591328" width="1" height="1"&gt;</description></item><item><title>re: Using undefined variables in JScript</title><link>http://blogs.msdn.com/b/ericlippert/archive/2006/05/04/590030.aspx#591214</link><pubDate>Sat, 06 May 2006 03:22:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:591214</guid><dc:creator>bmm6o</dc:creator><description>Ah, of course. &amp;nbsp;Once you expanded it to &amp;quot;evaluate the LHS&amp;quot; the light bulb went off (or on, rather). &amp;nbsp;I was stuck on thinking of doing just a global variable lookup.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=591214" width="1" height="1"&gt;</description></item><item><title>re: Using undefined variables in JScript</title><link>http://blogs.msdn.com/b/ericlippert/archive/2006/05/04/590030.aspx#590953</link><pubDate>Fri, 05 May 2006 21:53:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590953</guid><dc:creator>Pete T</dc:creator><description>Slightly off-topic, but could you clarify:&lt;br&gt;1. Is IE 7 due to include JScript.Net (i.e. client access to the frameworks from page scripts)?&lt;br&gt;2. Is JScript.Net an officially deprecated language on the server, or is it just not a priority for Microsoft?&lt;br&gt;&lt;br&gt;Personally I think the ability to use the same syntax on client and server is great for UI Coders who need to code in both environments to produce a modern, efficient UI.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=590953" width="1" height="1"&gt;</description></item><item><title>re: Using undefined variables in JScript</title><link>http://blogs.msdn.com/b/ericlippert/archive/2006/05/04/590030.aspx#590291</link><pubDate>Fri, 05 May 2006 01:54:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590291</guid><dc:creator>Eric Lippert</dc:creator><description>There are three things that have to happen in the right order:&lt;br&gt;&lt;br&gt;1) Evaluate the LHS. &amp;nbsp;(Where's it going?)&lt;br&gt;2) Evaluate the RHS. (What's going there?)&lt;br&gt;3) Put it there, creating &amp;quot;there&amp;quot; if necessary.&lt;br&gt;&lt;br&gt;I was asking the question &amp;quot;why does #3 have to happen after #2?&amp;quot; &amp;nbsp;&lt;br&gt;&lt;br&gt;Because if #2 produces an exception, then #3, which potentially has the side effect of altering the global name table, must never happen.&lt;br&gt;&lt;br&gt;You are asking the question &amp;quot;why does #2 have to happen after #1?&amp;quot;, and the answer is pretty much the same == because evaluating the left hand side can produce arbitrary errors and those errors must happen BEFORE any side effects produced by evaluating the RHS. &amp;nbsp;When we ask the host &amp;quot;do you have y?&amp;quot; the host is free to say &amp;quot;throw an exception&amp;quot; rather than simply saying &amp;quot;nope&amp;quot;, and if the host does that, then we need to make sure that any exception catcher runs without the side effects of the right hand side having happened.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=590291" width="1" height="1"&gt;</description></item><item><title>re: Using undefined variables in JScript</title><link>http://blogs.msdn.com/b/ericlippert/archive/2006/05/04/590030.aspx#590274</link><pubDate>Fri, 05 May 2006 01:32:44 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:590274</guid><dc:creator>bmm6o</dc:creator><description>I understand the point you make at the end, but why do you have to do the lookup before you have a value to store? &amp;nbsp;Is there a reason you can't evaluate the right side first, and then look up y?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=590274" width="1" height="1"&gt;</description></item></channel></rss>