|
Post by robert on Jan 25, 2022 12:53:02 GMT
I am trying to create a basic nested FOR loop. A previous answer gets close to what I want: Basic for loop behaving strangelyCode shown here, but with the MESSAGE PROMPT modified to show the correct numbers for the inner and outer loops: 1 | FOR | I | = | 0 TO 3 | NEXT
2 | RUN ACTION | DEFINE STRING VARIABLE | %parent%::%I%
3 | FOR | I | = | 0 TO 5 | NEXT
4 | RUN ACTION | DEFINE STRING VARIABLE | %child%::%I%
5 | RUN ACTION | MESSAGE PROMPT | Parent=%parent% of 3 Child=%child% of 5::loop status::2
6 | FOR | NEXT
7 | FOR | NEXT Unfortunately that accepted answer also does not work as intended. On the first iteration of the outer loop (%parent%), the %child% variable in the inner loop only goes from 1 to 3. On subsequent iterations of the outer loop, %child% goes from 1 to 5 as it should. Is there any option to put anything other than I as a counter in a loop?
|
|
|
Post by Steve on Jan 31, 2022 0:15:45 GMT
Hi robertYes this should be working but isnt working as expected. Its not right. I'll have a look at the code. Most likely a bug I think. Cheers for finding this one. Steve.
|
|