annotate test/arrays4.d @ 37:77cdca8c210f trunk

[svn r41] new'd dynamic arrays are now initialized with the element type's default initializer. initial label/goto support.
author lindquist
date Wed, 10 Oct 2007 03:38:24 +0200
parents c0967c4b2a74
children 8b0e809563df
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
c0967c4b2a74 [svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff changeset
1 module arrays4;
c0967c4b2a74 [svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff changeset
2
c0967c4b2a74 [svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff changeset
3 void main()
c0967c4b2a74 [svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff changeset
4 {
c0967c4b2a74 [svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff changeset
5 auto arr = new int[4];
37
77cdca8c210f [svn r41] new'd dynamic arrays are now initialized with the element type's default initializer.
lindquist
parents: 36
diff changeset
6 auto arrcat = arr ~ arr;
77cdca8c210f [svn r41] new'd dynamic arrays are now initialized with the element type's default initializer.
lindquist
parents: 36
diff changeset
7 assert(arrcat.length == arr.length * 2);
36
c0967c4b2a74 [svn r40] Cleaned up some of the array routines to use gep/load/store instead of memcpy/memset.
lindquist
parents:
diff changeset
8 }
37
77cdca8c210f [svn r41] new'd dynamic arrays are now initialized with the element type's default initializer.
lindquist
parents: 36
diff changeset
9