Mercurial > projects > ldc
view test/b.d @ 297:5de180867c46 trunk
[svn r318] Moved the call to DtoBoolean before the not instruction.
Fixes array_initialization_17_A.
author | ChristianK |
---|---|
date | Mon, 23 Jun 2008 19:19:37 +0200 |
parents | d9d5d59873d8 |
children |
line wrap: on
line source
module b; extern(C) int printf(char*, ...); struct S { int i; float[4] f; } void main() { S s; int i = s.i; int* p = &s.i; *p = 42; printf("%d == %d\n", *p, s.i); float* f = &s.f[0]; printf("%f == %f\n", *f, s.f[0]); *f = 3.1415; printf("%f == %f\n", *f, s.f[0]); s.f[0] = 123.456; printf("%f == %f\n", *f, s.f[0]); }