switch(KEY_Num)
{
case 0: FriNum=0;break;
case 1: FriNum=1;break;
case 2: FriNum=2;break;
case 3: FriNum=3;break;
case 4: FriNum=4;break;
case 5: FriNum=5;break;
case 6: FriNum=6;break;
case 7: FriNum=7;break;
case 8: FriNum=8;break;
case 9: FriNum=9;break;
case 10: FriNum=10;break;
// case 11: FriNum=11;break;
// case 12: FriNum=12;break;
}
会执行,不过最好有个 default: ... break;
详情回复
发表于 2015-12-16 17:51
switch(KEY_Num)
{
case 0: FriNum=0;break;
case 1: FriNum=1;break;
case 2: FriNum=2;break;
case 3: FriNum=3;break;
case 4: FriNum=4;break;
case 5: FriNum=5;break;
case 6: FriNum=6;break;
case 7: FriNum=7;break;
case 8: FriNum=8;break;
case 9: FriNum=9;break;
case 10: FriNum=10;break;
// case 11: FriNum=11;break;
// case 12: FriNum=12;break;