comparison test/foreach2.d @ 34:4648206ca213 trunk

[svn r38] * resizing dynamic arrays support * throw is replaced with assert(0) * catch is ignored * better foreach support * various bugfixes
author lindquist
date Tue, 09 Oct 2007 02:50:00 +0200
parents
children d9d5d59873d8
comparison
equal deleted inserted replaced
33:bc641b23a714 34:4648206ca213
1 module foreach2;
2
3 void main()
4 {
5 static arr = [1.0, 2.0, 4.0, 8.0, 16.0];
6 foreach(i,v; arr)
7 {
8 printf("arr[%d] = %f\n", i, v);
9 }
10 printf("-------------------------------\n");
11 foreach_reverse(i,v; arr)
12 {
13 printf("arr[%d] = %f\n", i, v);
14 }
15 }