複数のwhileループで要素を探していますが、要素が見つかった場合は、次のwhileループを確認する必要はありません。このようなことをどうすれば実現できますか?中断して次のループをスキップ
while(something) {
if (this = key) {
// break this loop and skip the next ones. Otherwise proceed to next.
}
}
while(somethingelse) {
if (this = key) {
// break this loop and skip the next ones. Otherwise proceed to next.
}
}
while(somethingthird) {
if (this = key) {
// break this loop and skip the next ones. Otherwise stop looking.
}
}
恐ろしい... goto'を使うことができます!私は今シャワーを浴びている。 –