切换案例:从另一个案例中转到“否则”

问题描述

是否可以根据条件从 switch 中的一个案例转到另一个案例? 下面是一个例子:

flag_1 = 'a'
flag_2 = 1;

x = 0;

switch flag_1
    case 'a'
       if flag_2  == 1
          % go to otherwise
       else 
          x = 1;
    otherwise
       x = 2;
end

如果 flag_2 == 1 我想从 case 'a' 转到 otherwise。可能吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)