June 15, 2005
Rodolfo Borges napsal(a):
> http://www.digitalmars.com/d/statement.html#foreach
> 
> says:
> ForeachStatement:
> foreach (ForeachTypeList; Expression) Statement
> 
> //shouldn't it allow:
> foreach(int i; [ 1, 2, 3, 4 ]) {
> }
> 
> //not pretty to force me write:
> static int[] dummy = [ 1, 2, 3, 4 ];
> foreach(int i; dummy) {
> }
> 
> 
you can use Python for this feature ;)
1 2
Next ›   Last »