for in D versus C and C++

BCS none at anon.com
Thu Mar 19 08:53:44 PDT 2009


Hello Sergey,

> Thu, 19 Mar 2009 06:35:37 -0400, Steve Teale wrote:
> 
>> for (; a<b; a++);
>> 
>> is illegal in D.
>> 
>> Doesn't this break a lot of C and C++ code?
>> 
> for (; a<b; a++) {}
> 
> is legal.  I don't think that an empty statement after for is used in
> "a lot of code."
> 

it's a trivial fix and easy to find. Heck, you hardly need to think!





More information about the Digitalmars-d mailing list