Files
ldc/test/foreach3.d
Tomas Lindquist Olsen 3db5b9bb98 [svn r38] * resizing dynamic arrays support
* throw is replaced with assert(0)
* catch is ignored
* better foreach support
* various bugfixes
2007-10-09 02:50:00 +02:00

20 lines
263 B
D

module foreach3;
void main()
{
static str = ['h','e','l','l','o'];
foreach(i,v; str) {
printf("%c",v);
}
printf("\n");
foreach(i,v; str) {
v++;
}
foreach(i,v; str) {
printf("%c",v);
}
printf("\n");
}