DMD 0.174 release

Stewart Gordon smjg_1998 at yahoo.com
Thu Nov 16 03:13:20 PST 2006


Walter Bright wrote:
> Stewart Gordon wrote:
<snip>
>> 4. Why do ForStatement and ForeachStatement now take a 
>> NoScopeNonEmptyStatement as body, rather than a ScopeStatement?
> 
> The scope is created by the for initialization, not the body.

So the whole ForStatement creates a scope, and Initialize, Test, 
Increment and the statement body all share this scope?  This ought to be 
a little clearer.  The way it's written at the moment ("that variable's 
scope extends through the end of NoScopeNonEmptyStatement") looks like a 
contradiction.

Stewart.

-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:-@ C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS- 
PE- Y? PGP- t- 5? X? R b DI? D G e++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox.  Please keep replies on 
the 'group where everyone may benefit.



More information about the Digitalmars-d-announce mailing list