Is there a way in CW to control type when initializing union members?
In the code below, all the param elements are initialized as integers even though some are ints and some are floats. If I change the declaration so float appears first in the union, all params are initialized as floats.
I've tried typecasting the assigned values but that doesn't work. Any ideas?
Davetypedef struct { char *Desc; union { int i; float f; } Val;} TestStruct;const struct { char *Desc; TestStruct Param[2];} List[] = { {"ListItem1", "param1", 1, "param2", 2.0}, {"ListItem2", "param1", 3.0, "param2", 4} };void main(void) { for(;;) {}}