while (statement 1){
......
......
if (statement 2){
x <- x + 1
break
}
if (statement 3){
y <- y + 1
}
}
I have a pseudocode as shown above, I want to verify my understanding whether is correct or not. Is it when the statement 2
is fulfilled, the equation in the 1st if loop
will still run, then it will break the if loop
and never come back again even the while loop
still continue going on?
I hope I can get an explanation about the break function in this senario. Appreciate for your help!
Aucun commentaire:
Enregistrer un commentaire