I was trying to write some code and I was having a problem using a negative value in a switch statement not being executed (in AVR Studio 5.0.1163). I have used a negative value in other C compilers, is this a bug or my stupidity?
Negative value in switch statement
Author
Message
Suggest you post the code so it can be reviewed and commented on.
Should be OK if the variable is declared as signed
stevech wrote:
In the New Testament (Kernighan and Ritchie, 2nd edition) it says that the expression is of type integer,so it's a signed
Should be OK if the variable is declared as signed