If using Jacl, the syntax is similar to the Jython commands above, the main difference being the replacement of brackets with braces.
如果使用Jacl,语法类似于上述的Jython命令,主要区别是Jacl使用大括号代替了中括号。
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循环的不同之处,是这个结构不管怎么样,它会做一些事情。
What is the difference between a syntax error and a bug?
语法错误和Bug之间有何不同?
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 conceptually the key difference here, besides the syntax looking slightly different, it just means that if you want a chunk of code to execute no matter what initially, ; you can use the do while loop; if you want to check a condition first, you can use the while loop.
所以概念上,则关键的区别是,除了语法看起来有点不同,它的意思是如果你想要一段代码,最初无论如何都要执行,你就可以用do,while循环;,如果你想要先检查条件,你可以用while循环。
应用推荐