mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 19:03:13 +01:00
29 lines
339 B
D
29 lines
339 B
D
module bug50;
|
|
extern(C) int printf(char*, ...);
|
|
|
|
struct S
|
|
{
|
|
int i;
|
|
float f;
|
|
long l;
|
|
|
|
void print()
|
|
{
|
|
printf("%d %f %lx\n", i, f, l);
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
S s;
|
|
s.print();
|
|
s = S(1,2,3);
|
|
s.print();
|
|
|
|
S[] arr;
|
|
{arr ~= s;}
|
|
{arr[0].print();}
|
|
{arr ~= S(1,2,3);}
|
|
{arr[1].print();}
|
|
}
|