... may expect. All the codeblocks use the value of the variable after exiting from the loop, in this sample, 61. In such cases, codeblocks should be constructed in separate functions, using the concept of detached locals. This code works: for i = 1 to 60 Tget():redefine(1000+i, ...