do-while loop 循环 ; 重复叙述
Continue must be in a loop (e.g., for, do, while). It cannot appear in case constructs.
continue一定是在for, do, while这些循环中,而不能在实例构建中出现。
The difference with the do while loop, as the syntax kind of suggests, is that this construct is going to do something no matter what.
作为建议的语法,do, while循环的不同之处,是这个结构不管怎么样,它会做一些事情。
So this do while loop immediately breaks out at the point of that check.
所以这个do,while,循环在检查的时候,直接中断了。
The difference with the do while loop, as the syntax kind of suggests, is that this construct is going to do something no matter what.
作为建议的语法,do,while循环的不同之处,是这个结构不管怎么样,它会做一些事情。
Then we have to steal the code from earlier to do a forever loop, a while true loop and then I'm gonna go ahead and use that printf thing that we saw.
然后再借用先前的代码,做一个永久性的循环,即while循环,紧接着需要用到一个,之前我们看到过的printf函数。
I probably whip out a do while loop very rarely, but very often when programming games or any program that takes user input and has to check that user input and yell at the user if they're messing with you or aren't providing what's expected.
我可能很少用do,while,循环,但常常是,当编制程序游戏或需要用户输入的程序是,需要检查用户的输入并提醒用户,如果他们干扰了你,或没有提供所期望的输入。
应用推荐