Good evening...
The following code is of an Event, simply running two Loops, one inside the other. It never exits. It would appear (having traced the values with F9...) that the Outer Loop does not obey the test for exiting (my Bold...), despite its Value becoming 0 at the appropriate moment.
...I can make the Loop exit using Labels...
Is this the only way to get this code to work..? Is there something specific to the MV use of Loops that prevent the nesting from working correctly..? Have I overlooked something blindingly obvious..?
Thanks in advance for any light shed on this (apparent...) bug; meanwhile...
Have a nice day
Douglas
The following code is of an Event, simply running two Loops, one inside the other. It never exits. It would appear (having traced the values with F9...) that the Outer Loop does not obey the test for exiting (my Bold...), despite its Value becoming 0 at the appropriate moment.
◆Control Variables:#0001 Oute_Loop = 3
◆Control Variables:#0002 Inne_Loop = 3
◆Comment:Outer Loop...
◆Loop
◆If:Oute_Loop = 0
◆Break Loop
◆
:End
◆Comment:Inner Loop...
◆Loop
◆If:Inne_Loop = 0
◆Break Loop
◆
:End
◆Control Variables:#0002 Inne_Loop -= 1
◆
:Repeat Above
◆Control Variables:#0001 Oute_Loop -= 1
◆
:Repeat Above
◆Text:None, Window, Bottom
: :Done
◆Control Variables:#0002 Inne_Loop = 3
◆Comment:Outer Loop...
◆Loop
◆If:Oute_Loop = 0
◆Break Loop
◆
:End
◆Comment:Inner Loop...
◆Loop
◆If:Inne_Loop = 0
◆Break Loop
◆
:End
◆Control Variables:#0002 Inne_Loop -= 1
◆
:Repeat Above
◆Control Variables:#0001 Oute_Loop -= 1
◆
:Repeat Above
◆Text:None, Window, Bottom
: :Done
...I can make the Loop exit using Labels...
◆Control Variables:#0001 Oute_Loop = 3
◆Control Variables:#0002 Inne_Loop = 3
◆Comment:Outer Loop...
◆Loop
◆If:Oute_Loop = 0
◆Jump to Label:End_Here
◆Break Loop
◆
:End
◆Comment:Inner Loop...
◆Loop
◆If:Inne_Loop = 0
◆Break Loop
◆
:End
◆Control Variables:#0002 Inne_Loop -= 1
◆
:Repeat Above
◆Control Variables:#0001 Oute_Loop -= 1
◆
:Repeat Above
◆Label:End_Here
◆Text:None, Window, Bottom
: :Done
◆Control Variables:#0002 Inne_Loop = 3
◆Comment:Outer Loop...
◆Loop
◆If:Oute_Loop = 0
◆Jump to Label:End_Here
◆Break Loop
◆
:End
◆Comment:Inner Loop...
◆Loop
◆If:Inne_Loop = 0
◆Break Loop
◆
:End
◆Control Variables:#0002 Inne_Loop -= 1
◆
:Repeat Above
◆Control Variables:#0001 Oute_Loop -= 1
◆
:Repeat Above
◆Label:End_Here
◆Text:None, Window, Bottom
: :Done
Is this the only way to get this code to work..? Is there something specific to the MV use of Loops that prevent the nesting from working correctly..? Have I overlooked something blindingly obvious..?
Thanks in advance for any light shed on this (apparent...) bug; meanwhile...
Have a nice day
Douglas
