I have a case where I need to break out of several loops. I thought calling Exit more than once would work but it seems not.
Is it possible to break out of multiple loops?
If not, would you consider something like Exit n (where n is the number of loops to break out of)?
Is it possible to break out of multiple loops?
If not, would you consider something like Exit n (where n is the number of loops to break out of)?
B4X:
Sub Process_Globals
Dim a,b As Int
End Sub
Sub AppStart (Args() As String)
Do While a<5
Log("inner loop 1")
Do While b<5
Log("inner loop 2")
b=b+1
If b=3 Then
Log("I want to exit BOTH loops")
Exit : Exit
End If
Loop
a=a+1
Loop
Log("end")
End Sub