定义j时应注意其变量类型char,此循环当j=0时,再执行一次则keil中j=0XFF,而不是-1,所以无法跳出循环。但在vc6.0中是可以跳出循环的。
解决办法如下:不能让j的值为负数
uchar j;