In the following code:-
char a = 0x80; unsigned char b = 0x80; if(a==0x80) printf("a==0x80\n"); if(b==0x80) printf("b==0x80\n");
The range of values for a signed char is -128 to 127. The value you assign to a in:
char a = 0x80;
Jon, I understand what you're saying but if the "0x80" in
(a==0x80)
(a=='\x80')
have you tried disabling the ANSI Integer Promotions?
View all questions in Keil forum