foreach syntax

Timon Gehr timon.gehr at gmx.ch
Fri Jun 29 07:23:15 PDT 2012


On 06/29/2012 04:16 PM, bearophile wrote:
> Timon Gehr:
>
>> Just because. This does not matter.
>
> Now and then I write foreach(x;y;data)

error: found ';' when expecting ')'

> or foreach(x,y,data) or

error: found ')' when expecting ';'

> foreach(x;y,data).

error: undefined identifier y

> "in" avoids some of those little mistakes.
>

foreach(x in y,data)


More information about the Digitalmars-d-learn mailing list