|
|||||
Loop indices | |||||
Prerequisite Concepts | Related Syntax |
There are two predefined switches and one predefined counter which can be accessed from within a repeat over
loop. These are useful in determining the following information about the loop:
In a repeat over
, it is often useful to know whether the loop is at the first or last iteration. The predefined switches #first
and #last
can be accessed to determine this information. Each nested repeat over
loop has its own #first
and #last
switches.
A program can also ask for the index of the current iteration by accessing the predefined counter #item
. When repeat over
loops nest, each instance has its own indices.
Prerequisite Concepts Looping constructs |
Related Syntax #item repeat over |
---- |