函数里面有多个if但是我想要他执行完某个if之后直接跳出整个Keyscan()函数?
求解:函数里面有多个if但是我想要他执行完某个if之后直接跳出整个Keyscan()函数?void keyscan()
{
if(right==0)
{
delayms(5)
if (right==0)
gamesstatues=0;
}
if(down==0)
{
delayms(5)
if (down==0)
gamesstatues=1;
}
if(up==0)
{
delayms(5)
if (up==0)
gamesstatues=3;
}
if(left==0)
{
delayms(5)
if (left==0)
gamesstatues=2;
}
}