<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.lostsouls.org/w/skins/common/feed.css"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_block</id>
		<title>Man block - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.lostsouls.org/w/index.php?action=history&amp;feed=atom&amp;title=Man_block"/>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_block&amp;action=history"/>
		<updated>2026-05-05T14:05:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.8.2</generator>

	<entry>
		<id>http://wiki.lostsouls.org/w/index.php?title=Man_block&amp;diff=3953&amp;oldid=prev</id>
		<title>Laine at 19:10, 11 June 2007</title>
		<link rel="alternate" type="text/html" href="http://wiki.lostsouls.org/w/index.php?title=Man_block&amp;diff=3953&amp;oldid=prev"/>
				<updated>2007-06-11T19:10:23Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Description==&lt;br /&gt;
&lt;br /&gt;
A block is a special statment, that begins with '{', contains&lt;br /&gt;
a list of statements, and ends with '}'.&lt;br /&gt;
&lt;br /&gt;
The block may define local variables. If for a variable no&lt;br /&gt;
initialisation is given, the variable is initialised to 0 every&lt;br /&gt;
time the block is entered. Otherwise, the initialisation&lt;br /&gt;
expression is evaluated and its result assigned to the variable&lt;br /&gt;
everytime the block is entered.&lt;br /&gt;
&lt;br /&gt;
Example definitions are:&lt;br /&gt;
&lt;br /&gt;
  int i;&lt;br /&gt;
  int j = 3;&lt;br /&gt;
  int k = 3 * j, l;&lt;br /&gt;
&lt;br /&gt;
Here, i and l are both initialised to 0; j is initialised&lt;br /&gt;
to 3, and k is initialised to 9 (3 * j).&lt;br /&gt;
&lt;br /&gt;
Local variables defined in a block are visible only until the&lt;br /&gt;
end of the block. Definitions in an inner block hide definitions in&lt;br /&gt;
outer blocks.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
Up to 3.2.7, local variables were visible (from their point of&lt;br /&gt;
definition) in the whole function. That is, code like&lt;br /&gt;
&lt;br /&gt;
    do {&lt;br /&gt;
        int res;&lt;br /&gt;
&lt;br /&gt;
        res = ...&lt;br /&gt;
    } while (res == 5);&lt;br /&gt;
    write(res);&lt;br /&gt;
&lt;br /&gt;
was perfectly legal. It is no longer, as 'res' ceases to exist&lt;br /&gt;
with the closing '}' of the while().&lt;br /&gt;
&lt;br /&gt;
You can get this old behaviour back with the #pragma no_local_scopes.&lt;br /&gt;
To turn it off again, use #pragma local_scopes.&lt;br /&gt;
&lt;br /&gt;
Up to 3.2.8, local variables could not be initialised in their&lt;br /&gt;
definition.&lt;/div&gt;</summary>
		<author><name>Laine</name></author>	</entry>

	</feed>