OR / AND statement

If you have a simple question and just want an answer.
TMentink
Junior Member
Posts: 7
Joined: Sat Apr 19, 2014 7:52 pm

OR / AND statement

Post by TMentink »

Hello,I get wierd errors when programming with normal or / and statements.With this line "uint8_t foo = (R_REGISTER | (Register & REGISTER_MASK));" i get the error: parse error before ';'but when i run this lines : uint8_t foo = Register & REGISTER_MASK; uint8_t foo2 = R_REGISTER; foo = foo2 | foo;Then i get no errors.What am i doing wrong??


User avatar
Ross
XCore Expert
Posts: 968
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

"register" is a keyword - don't use it as a identifier!