Instead of (*I2C_Pckt).Task_Control, the idiomatic expression would be I2C_Pckt->Task_Control . As for the syntax error, there's nothing wrong with putting a semicolon there, so it might be something inside your braces. Try commenting out that block and see if it helps. - Marcel On Thu, Oct 9, 2008 at 8:46 PM, Brent Brown wrote: > On 10 Oct 2008 at 14:20, Grant Brown wrote: > > Hi List > > > > unsigned char Temp; > > Temp = (*I2C_Pckt).Task_Control; > > > > if ((Temp&I2C_BusGPO_Changed) > 0) > > { > > ... do something > > }; > > > > Why does this produce an error ? > > > > "GKB_SPI.c:548: error: syntax error before ';' token" > > > > Both variables being "anded" are unsigned chars > > Two possibilites: syntax of the following line looks dodgy, too hard for me > to figure > out what you are intending to do here : > > Temp = (*I2C_Pckt).Task_Control; > > Also the last line you probably don't want/need the semicolon after the > close > parenthesis: > > }; > > Like it says... syntax ;-) > > -- > Brent Brown, Electronic Design Solutions > 16 English Street, St Andrews, > Hamilton 3200, New Zealand > Ph: +64 7 849 0069 > Fax: +64 7 849 0071 > Cell: +64 27 433 4069 > eMail: brent.brown@clear.net.nz > > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist