Mercurial > projects > ldc
annotate tests/mini/foreach3.d @ 829:0a31c60a6bc1
.. and fixed the install target (hopefully)
author | elrood |
---|---|
date | Fri, 05 Dec 2008 22:01:50 +0100 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
34 | 1 module foreach3; |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
34
diff
changeset
|
2 extern(C) int printf(char*, ...); |
34 | 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 } |