How to interrupt a cycle of "whiles"?

Asked

Viewed 88 times

2

Well, I’m going to give a very abstract example in order to be able to express my doubt more simply

I have following code:

while(a>b){ // Meu while principal

while(c>d){

while(e>f){

}
}
}

Is there some command, so that I am inside one of mine whiles, and he goes back to the while main? If yes, what would be the command?

1 answer

3


The code is not very clear what you want, but it would be more or less this:

loop@ while (a > b){ // Meu while principal
    while (c > d) {
        while (e > f) {
            break@loop
        }
    }
}

I put in the Github for future reference.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.