According to the specification section 9.2.5:
The counted-loop form FOR(counter, target){ ... } MUST evaluate target exactly once at loop entry, require it to be an INT, initialize counter to 1, and execute the body once for each value through target, inclusive. The parallel counted-loop form PARFOR(counter, target){ ... } MUST evaluate target once, require an INT, execute iterations 1..target concurrently, wait for all iterations to finish, and then either continue normally or re-raise any collected iteration failures as described in 3.5.
Loop counters introduced by FOR and PARFOR MUST be loop-local. Other declarations created in loop bodies MUST remain bound in the enclosing environment, subject to the merge and race semantics defined for PARFOR.
In the implementation, however, the FOR loop counter override the global values. If the counter shares it's name with a non-INT global symbol, the original symbol is not restored.
According to the specification section 9.2.5:
In the implementation, however, the
FORloop counter override the global values. If the counter shares it's name with a non-INTglobal symbol, the original symbol is not restored.