<?xml version="1.0" encoding="windows-1252"?>
<node id="317590" title="Re: Re: Re: Re: Re: for loop localisation bug?" created="2003-12-29 19:15:09" updated="2004-10-19 22:43:30">
<type id="11">
note</type>
<author id="171588">
BrowserUk</author>
<data>
<field name="doctext">
&lt;p&gt;I said my Pascal was a long time ago:) I dug up a little  info on the last Pascal compiler I used -- in a [http://www.threedee.com/jcm/psystem/|museum]!

&lt;p&gt;For C, I think the info I dug up and posted [317541|here] is reasonably definitive. With deference to [MADuran]'s [317557|info] on C99 which I've never encountered, there is no definitive statement on the state of a C for loop variable after a for loop, simply because there is nothing special about a for loop variable in C. 

&lt;ul&gt;&lt;li&gt;It is simply a variable that has a scope defined by the block in which it is declared. 
&lt;/li&gt;&lt;li&gt;It must have been declared before it can be used in the for loop. 
&lt;/li&gt;&lt;li&gt;Any modifications made to it, either by the control statements or within the for loop body, persist after the for loop terminates, and until it goes out of scope.

&lt;/li&gt;&lt;li&gt;It remains in scope, until the block it was defined in, ends.
&lt;/li&gt;&lt;/ul&gt;

&lt;p&gt;One all. Now lets get back to perl:)
&lt;div class="pmsig"&gt;&lt;div class="pmsig-171588"&gt;
&lt;hr /&gt;
&lt;font size=1 &gt;
&lt;div&gt;Examine what is said, not who speaks.&lt;/div&gt;
"Efficiency is intelligent laziness." -David Dunham&lt;br /&gt;
"Think for yourself!" - [Abigail-II|Abigail] &lt;br /&gt;
[http://news.bbc.co.uk/1/hi/technology/3181108.stm|Hooray!]&lt;br /&gt;

&lt;/p&gt;&lt;/font&gt;

&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
317444</field>
<field name="parent_node">
317580</field>
</data>
</node>
