Top "Nested-loops" questions

A logical structure used in computer programming where two or more repeating statements are placed in a "nested" form (i.e., one loop is situated within the body of another).

How do I break out of nested loops in Java?

I've got a nested loop construct like this: for (Type type : types) { for (Type t : types2) { if (some condition) { // Do …

java loops nested-loops
How to break out of multiple loops?

Given the following code (that doesn't work): while True: #snip: print out current state while True: ok = get_input("Is …

python nested-loops break control-flow
Breaking out of nested loops

Is there an easier way to break out of nested loops than throwing an exception? (In Perl, you can give …

python loops nested-loops
What's the best way to break from nested loops in JavaScript?

What's the best way to break from nested loops in Javascript? //Write the links to the page. for (var x = 0; …

javascript loops nested-loops break
Can I use break to exit multiple nested 'for' loops?

Is it possible to use the break function to exit several nested for loops? If so, how would you go …

c++ for-loop break nested-loops
Breaking/exit nested for in vb.net

How do I get out of nested for or loop in vb.net? I tried using exit for but it …

vb.net for-loop nested-loops
Single Line Nested For Loops

Wrote this function in python that transposes a matrix: def transpose(m): height = len(m) width = len(m[0]) return [ [ m[…

python loops for-loop nested nested-loops
Breaking out of a nested loop

If I have a for loop which is nested within another, how can I efficiently come out of both loops (…

c# for-loop nested-loops
How to break out of nested loops?

If I use a break statement, it will only break inner loop and I need to use some flag to …

c nested-loops break
bash shell nested for loop

I want to write a nested for loop that has to work in the bash shell prompt. nested for loop …

bash shell nested-loops