avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Problem with union


From: Eric Fu
Subject: [avr-gcc-list] Problem with union
Date: Mon, 23 Aug 2004 22:23:32 +1000

I have a problem to use union in avrgcc. When I compile the following,:
typedef union TwoBytes 
{    /* unsigned 16 bit type for 8 & 16 */
 word wForm;   /* bit accesses: 16 bit var.wForm    */
 struct 
 {   /* 8 bit var.byForm.High/Low          */
  byte High;
  byte Low;
 }byForm;
}TwoBytes;

 
TwoBytes ThisNodeID;
ThisNodeID.wForm = 1;

I get compiling error:

error: parse error before '.' token

What Did I do wrong?

Thanks.


Eric Fu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]