Mercurial > projects > ldc
annotate test/b.d @ 58:2c3cd3596187 trunk
[svn r62] Added support for TypeInfo _Array, _Function, _Pointer, _Delegate, _Enum
Added initial support for CatExp aka 'a ~ b'
Fixed global constant static arrays initialized with string literals
Fixed casting any dynamic array to void*
Fixed new expression with temporary storage
Fixed alias declarations in function scope
Fixed relational comparisons of pointers
author | lindquist |
---|---|
date | Thu, 25 Oct 2007 09:02:55 +0200 |
parents | c53b6e3fe49a |
children | fd32135dca3e |
rev | line source |
---|---|
1 | 1 module b; |
2 | |
3 struct S | |
4 { | |
5 int i; | |
6 float[4] f; | |
7 } | |
8 | |
9 void main() | |
10 { | |
11 S s; | |
12 int i = s.i; | |
13 int* p = &s.i; | |
14 *p = 42; | |
15 printf("%d == %d\n", *p, s.i); | |
16 | |
17 float* f = &s.f[0]; | |
18 printf("%f == %f\n", *f, s.f[0]); | |
19 *f = 3.1415; | |
20 printf("%f == %f\n", *f, s.f[0]); | |
21 s.f[0] = 123.456; | |
22 printf("%f == %f\n", *f, s.f[0]); | |
23 } |