Depending on your needs, the following may work more simply, or may not be practical at all.
* A: Put the whole double loop structure inside a function, and use return to get out when the time comes. (Not good in situations where having a function call every time you do the double loop is too costly)
* B: Use while for the outer loop (while counter<= value and looping == true do) and set "looping" to false in the inner loop when the time comes. This feels neater to me than having a separate break outside.
Why are you doing this? Sounds like a while loop would be much more useful.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
ferdielance wrote:Depending on your needs, the following may work more simply, or may not be practical at all.
* A: Put the whole double loop structure inside a function, and use return to get out when the time comes. (Not good in situations where having a function call every time you do the double loop is too costly)
* B: Use while for the outer loop (while counter<= value and looping == true do) and set "looping" to false in the inner loop when the time comes. This feels neater to me than having a separate break outside.