OR / AND statement
-
- Junior Member
- Posts: 7
- Joined: Sat Apr 19, 2014 7:52 pm
OR / AND statement
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??
-
- XCore Expert
- Posts: 968
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
"register" is a keyword - don't use it as a identifier!