Loops/Nested: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: added syntax colouring the hard way)
Line 1,015: Line 1,015:
There is no direct way to break out of a nested loop in Dyalect, <code>goto</code> is also not supported, however the desired effect can be achieved by placing a nested loop in an expression context and make it return <code>true</code> if we need to break out of the parent loop:
There is no direct way to break out of a nested loop in Dyalect, <code>goto</code> is also not supported, however the desired effect can be achieved by placing a nested loop in an expression context and make it return <code>true</code> if we need to break out of the parent loop:


<lang dyalect>const array = [[2, 12, 10, 4], [18, 11, 20, 2]]
<lang dyalect>let array = [[2, 12, 10, 4], [18, 11, 20, 2]]
for row in array {
for row in array {