Mercurial > projects > ldc
comparison test/arrays7.d @ 40:8b0e809563df trunk
[svn r44] Lots of bug fixes.
New array literal support
New array ~= operator support (for single element)
New with statement support
More...
author | lindquist |
---|---|
date | Fri, 19 Oct 2007 07:43:21 +0200 |
parents | |
children | fd32135dca3e |
comparison
equal
deleted
inserted
replaced
39:fd5e8bbfcb25 | 40:8b0e809563df |
---|---|
1 module arrays7; | |
2 | |
3 struct S | |
4 { | |
5 int i; | |
6 float f; | |
7 long l; | |
8 } | |
9 | |
10 void main() | |
11 { | |
12 S[] arr; | |
13 S s; | |
14 arr ~= s; | |
15 arr ~= S(1,2.64,0xFFFF_FFFF_FFFF); | |
16 assert(arr[1].i == 1); | |
17 assert(arr[1].f > 2.63 && arr[1].f < 2.65); | |
18 assert(arr[1].l == 0xFFFF_FFFF_FFFF); | |
19 } |