Mercurial > projects > ldc
annotate tests/mini/mem6.d @ 704:43165a082535
Fixed issue with accessing a WithStatement context from inside a nested function. see mini/with2.d
Renamed some LLVM uses of ::create statics to ::Create , lower case ones will be deprecated soon.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Tue, 14 Oct 2008 13:21:14 +0200 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
212
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
1 module tangotests.mem6; |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
2 |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
3 extern(C) int printf(char*,...); |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
4 |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
5 int main(){ |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
6 int[] index; |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
7 char[] value; |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
8 |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
9 foreach(int i, char c; "_\U00012345-"){ |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
10 printf("str[%d] = %d\n", i , cast(int)c); |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
11 index ~= i; |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
12 //value ~= c; |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
13 } |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
14 printf("done\n"); |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
15 |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
16 return 0; |
4c2689d57ba4
[svn r228] Fixed: when new'ing basic types, the storage was not default initialized.
lindquist
parents:
diff
changeset
|
17 } |