On Friday, 21 July 2017 at 11:19:47 UTC, Patrick Schluter wrote:
In C there's no point in the X macro anymore since C99.
Designated initializer allow to do it properly[1] now.

    enum COLORS { red, blue, green, max };
char *cstring[max] = {[red]="red", [blue]="blue", [green]="green" }; /* C99 */

I don't see how this allows data for different arrays to be written in interleaved form and then extracted by column to initialize the separate arrays, as Walter's does.

Reply via email to