annotate tests/mini/foreach3.d @ 341:1bb99290e03a trunk

[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
author lindquist
date Sun, 13 Jul 2008 02:51:19 +0200
parents test/foreach3.d@d9d5d59873d8
children
rev   line source
lindquist@34 1 module foreach3;
lindquist@270 2 extern(C) int printf(char*, ...);
lindquist@34 3 void main()
lindquist@34 4 {
lindquist@34 5 static str = ['h','e','l','l','o'];
lindquist@34 6 foreach(i,v; str) {
lindquist@34 7 printf("%c",v);
lindquist@34 8 }
lindquist@34 9 printf("\n");
lindquist@34 10
lindquist@34 11 foreach(i,v; str) {
lindquist@34 12 v++;
lindquist@34 13 }
lindquist@34 14
lindquist@34 15 foreach(i,v; str) {
lindquist@34 16 printf("%c",v);
lindquist@34 17 }
lindquist@34 18 printf("\n");
lindquist@34 19 }