Vertaling van "a for loop" in Chinees
We konden deze vermelding niet vinden. Er worden benaderende resultaten weergegeven. Controleer je spelling of stel voor deze term aan het woordenboek toe te voegen.
This is very practical as it relieves us from writing a for loop to iterate over each value.
这很实用因为它使我们不必写 for 循环就可以迭代每个值。
The three statements at the head of a for loop usually do just one thing each, however any of them can be left blank.
三为团长的发言回路通常只做一件事,每个 但是任何人可以留下空白.
C-based programming languages have a for loop, but it's designed to perform a series of operations a specific number of times.
基于C 的编程语言具有for循环,但它的设计目的是对一系列操作执行特定次数。
Here is a simple example of a for loop used to add the first ten numbers.
下面是一个for语句的简例,用来将前十个数加起来:
If a variable needs to be reassigned, in a for loop, for example, use let to declare it.
如果一个变量需要被重新分配,以在一个循环为例,使用let 声明它。
And then the function grows a for loop, and little by little, it gets more and more complex, and more and more in need of tests, but because of the psychological barrier at each stage, it might never get them.
然后这个功能增加了一个for循环,一点一滴,变得越来越复杂,也越来越需要测试,但是由于每个阶段的心理屏障,这个功能可能永远都没有测试。
In fact, a for loop can be used to filter the items along the way, producing a new list at each stage
事实上,可以使用一个 for 循环在操作过程中过滤许多项,并在每个阶段都产生一个新列表:
You can't force the assignment of types in a for loop, as each element the for keyword loops over already has a different type. So you cannot write
您不能在 for 循环中强制分配类型,因为 for 关键字循环已经有不同的类型。所以您 不能 写:
It is also sometimes handy to declare and initialize a variable inside a for loop. This creates a variable that can only be accessed from inside the for-loop brackets.
在 for 回圈内也可以宣告一个变数并给定初值,这样可以让这个变数只能在该 for 回圈中存取。
To iterate through a range, such as an array or table, a for loop is used. When iterating over an array, the current array element is stored in the loop variable. When iterating over a dictionary, the index is stored in the loop variable.
要遍历一个范围(如数组或表),使用 for 循环。在数组上迭代时,当前数组元素存储在循环变量中。在遍历字典时, index 存储在循环变量中。
Note: The counter of a for loop doesn't need to be a number. It can be a value of any ordinal type, such as a character or an enumerated type.
注意:for循环计数器不必非是数字,它可以是任何有序类型的值,例如一个字符或一个枚举类型值。
For concurrent tasks, you can also use a for loop. Concurrency here means that not all tasks are executed together, but all tasks are sent to the queue, and the number of concurrent executions depends on the number of jobs.
并发的下发任务,也可以使用for循环。这里指的并发,并不是所有任务一起执行,而是所有任务都下发到队列,而执行的并发数量,取决于work的数量。
Rather than using the traditional Java iterator object inside of a for loop, a functional library will instead define a function - usually called "iter" or "map" - on the collection class that takes a function taking a single parameter (the object being iterated over).
无需在 for 循环内部使用传统的 Java 迭代器对象,而是使用一个函数库在集合类上定义一个函数 - 通常叫做 "iter" 或 "map" - 接受一个带单个参数(要迭代的对象)的函数。