当前位置:网站首页>C break continue return

C break continue return

2022-06-12 09:58:00 Take a sip of my toner

break: perform break operation , Jump out of the current whole loop , Go to the outer code and continue execution . Usually , Is from current break The loop of the nearest function body will be skipped . That is, only one cycle can be ended at a time
continue: perform continue operation , Jump out of this cycle , Continue running the loop from the next iteration , The inner loop has been executed , The outer code continues to run . Fields do not need to be followed by parameters . That is, the end of this cycle , And will then start the next cycle .
return: perform return operation , Return function directly , All the code in this function body ( Including the circulatory body ) No more . When a return value is required , It needs to be followed by a return value , Used to provide the return value required by the corresponding method . That is, it ends its cycle and its outer cycle at the same time .

原网站

版权声明
本文为[Take a sip of my toner]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120952026743.html