The advantages of adding a loop are that the loop is visible, and that you can control the rate of iterations through the loop if needed.
添加一个循环的好处在于循环是可见的,并且如果需要的话您可以通过循环控制迭代的速率。
Unfortunately, because the loop branch is so close to the return statement, you cannot predict both the loop branch and the return branch.
不幸的是,由于循环分支太接近返回语句,因此您无法预测循环分支和返回分支。
Then we loop over columns (first loop) and add the rest of the header cells to this row and add the row to the provider after the looping is done.
然后,我们将遍历列(第一次循环)并将其余的标题栏单元格添加到该行,并在遍历结束之后将该行添加到提供程序。
Some memory leaks occur due to program errors in which infinite loop in the application code allocates new objects and adds them to a data structure accessible from outside the program loop scope.
有些内存泄漏是由于程序错误发生的,在存在此类错误的情况下,应用程序代码中的无限循环会分配新的对象,并将其添加到可从程序循环范围外面访问的数据结构中。
Your code should (almost) never have multiple nested loops (a loop inside a loop inside a loop). Most of the code written today should use Hashtables, simple lists and singly nested loops.
在编写代码时应尽量避免嵌套循环,目前大多数代码都是使用了哈希表、简单链表和单循环。
All four variables are declared outside the loop and therefore have excessive scope even though they're only used inside the loop.
所有这四个变量都是在循环外声明的,尽管它们仅在循环内部使用,但作用域不止于此。
And what's this little loop say to do? This little loop says I'm going to write a function or procedures that takes in two messages.
这个小循环是做什么的,这个小的循环是,我要写一个函数或者过程来接受两条消息。
The WHILE-LOOP associates a condition with a sequence of statements enclosed by the keywords LOOP and END LOOP, as shown in Listing 7.
WHILE-LOOP 将一个条件与使用关键字LOOP和END LOOP包围的一个语句序列关联在一起,如清单 7 所示。
To avoid infinite iterations of LOOP statements, new EXIT and CONTINUE options to the IF statement are valid within LOOP statements.
为了避免loop语句的无限次迭代,在loop语句中可以使用IF语句的新exit和CONTINUE选项。
The routing between the general step (with no name) and While Loop contains logic that corresponds with the loop condition.
通用步骤(没有任何名称)和While循环之间的路由包含与循环条件对应的逻辑。
It contains a nested loop that calls exp , cos , and sin , followed by a loop that calls sin and SQRT .
它包含了一个嵌套的循环,该循环会调用exp 、cos以及sin,接下来是一个调用sin和sqrt的循环。
Most of the time, we just slap Iterator inside a for() loop or enhanced for() loop and move on, so to speak.
可以这么说,大部分时间我们只是将Iterator 随意放到for()循环或加强 for() 循环中,然后就继续其他操作了。
The main loop enters an indefinite loop, waiting for events and calling callbacks, until someone calls gtk_main_quit() by closing the window.
主循环进入无限循环,等候事件并调用回调,直到有人关闭窗口,调用 gtk_main_quit() 为止。
The main function creates a Glib event loop, gets a connection to the session bus, and integrates the D-BUS event handling into the Glib event loop.
main函数创建一个Glib事件循环,获得会话总线的一个连接,并将D -BUS事件处理集成到Glib事件循环之中。
The enhanced for loop (also sometimes known as "for-each" loop) can be used for collections that implement the Iterable interface and for arrays.
改进for循环(有时被称为“for - each”循环)能够用于实现了iterable接口的集合类及数组中。
The basic syntax of a for loop is shown in Listing 1, which also demonstrates how to use continue and break statements within a for loop.
清单1中显示了for循环的基本语法,还演示了如何在for循环中使用continue和break语句。
The recalculation loop (which recomputes the time slices for the processes) and the goodness loop have been eliminated, and o (1) algorithms are used for wakeup and schedule .
重算循环(为进程重新计算时间片)和goodness循环已经被取消,o(1)算法用于wakeup和schedulee 。
Figure 6 shows a while loop (manufacturing loop) that iterates over each order, selecting the correct manufacturing plant and submitting each order to the selected manufacturing plant.
图6显示了一个while循环(ManufacturingLoop),迭代每个订单,选择正确的生产厂家并且将每个订单提交给所选的生产厂商。
Modeler loops are mapped to FileNet constructs for each loop, by having one step to represent the condition check in the loop, and another step to represent the contents of the loop.
Modeler循环映射到每个循环的FileNet构造,方法是使一个步骤表示循环中的条件检查,使另一个步骤表示循环的内容。
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循环中继续下一次循环或中断循环。
The outer collect loop iterates over these reservation groups, and the inner collect loop iterates over the servers contained within each restrain group.
外部的collect循环遍历这些保留组,而内部的collect循环遍历每个限制组中的服务器。
2 SEC Because heat is no longer being transferred to the secondary loop, water pressure and water temperature in the primary loop rise. This is normal and no cause for concern.
2秒由于热量不能传到二次回路,主回路中的水压和水温上升,这很平常,不必担心。
This example USES two for loops. The outer for loop takes care of each row in The Times table, and the nested for loop takes care of the columns within each row.
本例使用两个for循环,外面的for循环关注乘法表中的每一行,嵌套的for循环关注每行内的列。
Thus, the script does not count 10 lines, it counts 10 iterations of the loop generated by the -n switch (see "perldoc perlrun" and Listing 2 for an example of that loop).
运算符在一个范围内迭代。因此,该脚本并不是数10个行,而是对- n开关生成的循环迭代10次(请参阅“perldocperlrun”和清单2,以获得该循环的示例)。
This article has introduced three Python program statements: the if statement, the while loop, and the for loop.
本文介绍了三种Python程序语句:if语句、while循环和for循环。
The reasonable approach is to do the basic flow once, do a loop once, and then do a loop a second time.
最合理的方法是做一遍基本流程,一遍循环流程,然后再做一遍循环流程。
The goal of the polymorphous initiative was to "institute a paradigm shift from static open loop to reactive closed-loop mission algorithms, application software, and hardware implementation."
多形态计划的目标是创建一种从静态开环转移到反应式闭环任务算法、应用软件和硬件的范例。
Feed a new loop of lace underneath the straight section and out through the previous loop.
饲料一个新的循环的花边下面的直线节和通过以前的循环。
Next comes loop which simply creates a loop and then react which has case statements that are used to handle incoming messages.
接下来进入到循坏,这里只是简单的创建一个循环并有一个case语句用来处理到来的消息。
The NNC is composed of an inside loop controller and an outside loop one in accordance with the two time scale.
基于时标分离的原则,神经控制器被设计为内环控制器和外环控制器两个部分。
应用推荐