Hi All, I don't believe this is actually a bug, but can anybody explain why this code works correctly
void func(int v1, int v2){ unsigned char code tbl[] = {'a', 'b', 'c', 'd', 0, '1', '2', '3', '4'}; signed char xdata diff = v1 - v2; if (diff >= -4 && diff <= 4) printf("%c\n", tbl[diff + 4]); }
void func(int v1, int v2){ unsigned char code tbl[] = {'a', 'b', 'c', 'd', 0, '1', '2', '3', '4'}; int xdata diff = v1 - v2; if (diff >= -4 && diff <= 4) printf("%c\n", tbl[diff + 4]); }
This problem has been corrected and will be included in the next C51 compiler update (which will be on the web site by November 5). Jon
This problem has been corrected and will be included in the next C51 compiler update (which will be on the web site by November 5). Will I be able to use this update with version 7.01 of the compiler?
C51 V7.50 is available on the web at: http://www.keil.com/update/sw/c51/7.50 Jon