comparison test/foreach3.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 foreach3;
2
3 void main()
4 {
5 static str = ['h','e','l','l','o'];
6 foreach(i,v; str) {
7 printf("%c",v);
8 }
9 printf("\n");
10
11 foreach(i,v; str) {
12 v++;
13 }
14
15 foreach(i,v; str) {
16 printf("%c",v);
17 }
18 printf("\n");
19 }