我有这样的代码:
if(condition1)
{
break MyLabel;
}
while(true)
{
//some code here
MyLabel: if(condition2) break;
//more code here
}
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
标签MyLabel缺失.
怎么了?
如何用下一个值重新开始当前循环.通过这个,我的意思是,如果我的功能是
for(int i=0; i<=2; i++)
{
if(i==1) FUNCTION;
print(i);
}
Run Code Online (Sandbox Code Playgroud)
那么输出应该是"02".