LBdgWgt
Member level 5
Hello,
For example i have this type of union data:
typedef union {
unsigned long int my_long;
float my_float;
double my_double;
unsigned int my_word[2];
unsigned char my_byte[4];
} mydata;
how can i initialize a variable declared in mydata type with floating point value?
I am writing a code for HCS12 using ICC12
this code line doesn't work when i chek in the .lst file
mydata data1 = {1.25};
results in:
0404 _data::
0404 00000001 .word 0,1
is this the problem of the compiler or...?
thanks for any answer.
For example i have this type of union data:
typedef union {
unsigned long int my_long;
float my_float;
double my_double;
unsigned int my_word[2];
unsigned char my_byte[4];
} mydata;
how can i initialize a variable declared in mydata type with floating point value?
I am writing a code for HCS12 using ICC12
this code line doesn't work when i chek in the .lst file
mydata data1 = {1.25};
results in:
0404 _data::
0404 00000001 .word 0,1
is this the problem of the compiler or...?
thanks for any answer.