Re: how to initialize nested struct elegantly?

2018-12-12 Thread elvisxzhou via Digitalmars-d-learn
On Wednesday, 12 December 2018 at 09:49:58 UTC, elvisxzhou wrote: import std.stdio; struct AA { int i; char c; double d; string s; float f; } struct BB { float f; AA[2] a; } void print(BB* bb) { writefln("bb.a[0].i=%d bb.f=%f", bb.a[0].i, bb.f); } void main()

how to initialize nested struct elegantly?

2018-12-12 Thread elvisxzhou via Digitalmars-d-learn
import std.stdio; struct AA { int i; char c; double d; string s; float f; } struct BB { float f; AA[2] a; } void print(BB* bb) { writefln("bb.a[0].i=%d bb.f=%f", bb.a[0].i, bb.f); } void main() { //dlang AA aa = { i:1010, f:0.1f };

Re: IOS support status

2018-06-29 Thread elvisxzhou via Digitalmars-d
On Wednesday, 20 June 2018 at 07:25:37 UTC, makedgreatagain wrote: On Wednesday, 20 June 2018 at 05:26:25 UTC, Joakim wrote: [...] master branch. [...] this is great. [...] the origin ldc with your patch is working. but I find it is very limit betterC support with old version(some