i woul like to know how to remove the union in this short extract of code. i have no idea. any suggestion would great.
thanks
{
char rata;
union {
unsigned short cookie;
struct {
char LowByte;
char HighByte;
};
};
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Jan 27, 2007 11:18 pm
It's tough to know what you want. What would you like to see after
the union is "removed" ?
Also, be aware that an "unsigned short" is an unsigned 16-bit integer
in most C compilers. But in CCS, a "short" is a 1-bit variable.
To translate an "unsigned short" from a normal C program to CCS,
you would change it to an "int16" in CCS.
Ttelmah Guest
Posted: Sun Jan 28, 2007 3:37 am
Also, as posted, it also doesn't make any sense. The union has no 'name', so couldn't be accessed...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum