Mercurial > projects > ldc
annotate tests/mini/memory1.d @ 850:5f5e6eb790e7
Automated merge with http://hg.dsource.org/projects/ldc
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sun, 14 Dec 2008 16:30:20 +0100 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
34 | 1 module memory1; |
2 | |
133
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
34
diff
changeset
|
3 extern(C) int printf(char*,...); |
44a95ac7368a
[svn r137] Many fixes towards tango.io.Console working, but not quite there yet...
lindquist
parents:
34
diff
changeset
|
4 |
34 | 5 void main() |
6 { | |
7 auto a = new int[16]; | |
8 {printf("array.length = %u\n", a.length);} | |
9 {a.length = a.length + 1;} | |
10 {printf("array.length = %u\n", a.length);} | |
11 {assert(a.length == 17);} | |
12 } |