mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
* throw is replaced with assert(0) * catch is ignored * better foreach support * various bugfixes
20 lines
263 B
D
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");
|
|
}
|