C语言:break、continue、return在switch语句中的跳转关系

来源:互联网 发布:驱动精灵有mac版吗 编辑:程序博客网 时间:2024/06/05 05:05
void fun1() {    char Variable;    Variable = xx;    switch (Variable) {    case Value1:        代码1;        break;//跳出switch循环:即直接跳到代码5(第22行)    case Value2:        代码2;        continue;//跳出本次switch循环:即直接跳回switch处(第5行)    case Value3:        代码3;        return;//跳出fun1()函数    default:        代码4;        break;    }    代码5;}
0 0
原创粉丝点击