Listing 8 shows an example of using an iterating WHILE-LOOP.
清单8展示了一个使用迭代WHILE - LOOP的例子。
While loops have a loop condition that is evaluated before each iteration.
While循环具有在每次迭代之前评估的循环条件。
While the condition is true, the steps in the loop are performed.
当条件为true 时,将执行循环中的步骤。
Repeat until Loops are similar to While Loops, except that the activities in the loop are repeated until a condition is true.
RepeatUntil循环类似于While循环,只不过循环中的活动一直重复,直到某个条件为True。
While it might be possible to identify the memory leaking data structure by analyzing the heap dumps, identifying the memory leaking code which is in a infinite loop is not straightforward.
虽然通过分析堆转储能够标识内存泄漏数据结构,但是标识无限循环中的内存泄漏代码并不简单。
The loop then continues while there are links remaining to visit.
当还存在需要访问的链接时,循环继续。
In this way, the FileNet process ACTS in the same manner as a while loop, even though loops are not supported.
从这方面说,FileNet流程尽管不支持循环,但其操作方式与while循环相同。
One of the threads then calls the SPU_RUN ioctl on the run file, while the other runs in an event loop on the mailbox files and potentially other file descriptors.
其中一个线程然后会对运行文件调用SPU_RUNioctl系统调用,而其他线程则可以对邮箱文件和其他可能的文件描述符执行一个事件循环。
Some models are decomposed into multiple levels, such as a While loop within a local subprocess, within a While loop.
有些模型被分解为多个级别,例如While循环中的局部子流程中的While循环。
The routing between the general step (with no name) and While Loop contains logic that corresponds with the loop condition.
通用步骤(没有任何名称)和While循环之间的路由包含与循环条件对应的逻辑。
The for loop now iterates through the copy, while you're modifying the original list.
现在for 循环将迭代该副本,而对原始 list进行修改。
Some walkers make the loop once or twice, while others manage to log several miles, learning about interesting subjects along the route.
有些团员会走一两圈,而其它的人则走上好几英里,沿途学习有趣的新知。
In the second case, a nonlinear element may be situated anywhere in a control loop while the input of the element is known.
第二种情况是非线性元件在控制系统的任意处而其输入是已知的。
This starts the second trip through the while loop, where the variable I becomes 25.
这就会第二次进入while循环,这次变量i变成了25。
With improved phase estimation method, a carrier signal phase with phase noise can be estimated, while loop SNR also increases.
并采用新的相位估计方式估计含相位噪声的载波相位,提升了该条件下的环路信噪比。
The continue and break statements are used inside a while loop to continue with the next pass through the loop or break out of the loop, respectively.
continue和break语句分别用于在 while循环中继续下一次循环或中断循环。
Now instinctively, prefer the for loop or the while loop?
现在凭感觉,你们喜欢for循环还是while循环?
The while loop declaration describes the conditions under which the loop will continue.
while循环声明描述循环继续的条件。
A while loop will rarely include the number of iterations — unless it is a for loop in disguise.
while循环很少包含迭代次数——除非它是一个伪装的for循环。
That's why the main test method in Listing 1 USES a while loop instead of a new for loop.
这就是为什么清单1中的main测试方法使用while循环而不是一个新的for循环。
The while loop (like the for loop introduced later in this article) supports three additional statements
while循环(与本文后面介绍的for 循环一样)支持三种附加语句
For a while loop, however, this means the code in the else clause is executed once, after the loop is terminated (see the pseudocode shown in Listing 7).
但是对于while循环,这意味着在循环终止后,else子句中的代码被执行一次(参见清单7中的伪代码)。
At the bottom of the while loop, you read another directory entry and process it.
在while循环的底部,读取另一个目录条目并对其进行处理。
The obvious issue is that the NULL check must be part of the while loop.
明显的问题是NULL检查必须放在 while 循环中。
Going a step further, look at the structure of the code inside the while loop.
再进一步,看看while循环内部的结构。
BuildCanary then goes back to the top of its while loop and waits for the next message.
然后,BuildCanary回到while循环的顶端,等待下一条消息。
Obviously, since this is a snapshot in time, the line could be any line inside the while loop, such as line 16, 17, or 18.
显而易见,因为这是一个即时快照,所以该行可能是while 循环中的任意行,比如行16、17或 18。
The while loop, as was the case with the if statement, supports an optional else clause containing a block of program statements executed when the expression is False.
while循环与if语句一样,支持一个可选的else子句,其中包含一个当表达式计算为False时执行的程序语句块。
The while loop, as was the case with the if statement, supports an optional else clause containing a block of program statements executed when the expression is False.
while循环与if语句一样,支持一个可选的else子句,其中包含一个当表达式计算为False时执行的程序语句块。
应用推荐