for in D versus C and C++

Sergey Gromov snake.scaly at gmail.com
Thu Mar 19 04:01:15 PDT 2009


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."



More information about the Digitalmars-d mailing list