Mercurial > projects > ldc
annotate tests/mini/foreach3.d @ 1613:8f50a13d09a0
Merge DMD r286: remove dead code
---
dmd/interpret.c | 49 ++-----------------------------------------------
dmd/mars.c | 2 +-
2 files changed, 3 insertions(+), 48 deletions(-)
author | Leandro Lucarella <llucax@gmail.com> |
---|---|
date | Wed, 06 Jan 2010 15:18:21 -0300 |
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 } |