August 16, 2001 static initialization of structs and using ':' | ||||
|---|---|---|---|---|
| ||||
Greetings...
C99 (and gnu for a while) implemented this using '='
not ':'. I.e.
struct X { int a; int b; };
static X x = { a = 1, b = 2 };
I don't care for C99's use of the '.' before the
field name; D's syntax is much cleaner.
Regards,
Matt
| ||||
August 18, 2001 Re: static initialization of structs and using ':' | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Matt Gessner | Matt Gessner wrote in message <3B7C1A1C.2010001@aiinet.com>... >Greetings... > >C99 (and gnu for a while) implemented this using '=' >not ':'. I.e. > >struct X { int a; int b; }; > >static X x = { a = 1, b = 2 }; > >I don't care for C99's use of the '.' before the >field name; D's syntax is much cleaner. > >Regards, > >Matt I just liked the look of the : better. | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply