[svn r37] * Initial support for foreach on static arrays. Not 100% complete

This commit is contained in:
Tomas Lindquist Olsen
2007-10-04 22:38:53 +02:00
parent e4eaf0455d
commit e17f720cce
2 changed files with 43 additions and 13 deletions

17
test/foreach1.d Normal file
View File

@@ -0,0 +1,17 @@
module foreach1;
import std.stdio;
void main()
{
static arr = [1,2,3,4,5];
writef("forward");
foreach(v;arr) {
writef(' ',v);
}
writef("\nreverse");
foreach_reverse(v;arr) {
writef(' ',v);
}
writef("\n");
}