An iteration index is also maintained when iterating through the elements of a collection.
进行数字迭代的情形一样,在迭代集合中的元素时同样要维护一个迭代索引。
They specify the initial value of the index for the iteration and the index value at which iteration should cease, respectively.
它们分别指定迭代索引的初始值以及迭代索引的终止值。
If the var attribute is specified, then a scoped variable with the indicated name will be created and assigned the current value of the index for each pass through the iteration.
如果指定了var属性,那么将会创建一个带有指定名称的并限定了作用域的变量,并将每次迭代的当前索引值赋给该变量。
The index of the iteration thus starts at the value of the begin attribute, is incremented by the value of the step attribute, and halts iteration when it exceeds the value of the end attribute.
这样,迭代索引从begin属性的值开始,以step 属性的值为增量进行递增,在迭代索引超过end 属性的值时停止迭代。
The index of the iteration thus starts at the value of the begin attribute, is incremented by the value of the step attribute, and halts iteration when it exceeds the value of the end attribute.
这样,迭代索引从begin属性的值开始,以step 属性的值为增量进行递增,在迭代索引超过end 属性的值时停止迭代。
应用推荐