break loop, continue loop
break loop skips the remaining code till loop end, stops the loop and continues with next statements after the loop.
continue loop skips the remaining code till loop end and continues with the next loop round, provided the loop condition is met.
Indirect parameter passing is disabled
0
echo("Break and continue loops");
for (a[] = 1, a[] <= 4, a[]++)
{
echo(" Loop begin ", a[] );
if (a[] = 2) continue loop;
if (a[] = 3) break loop;
echo(" Loop end ", a[] );
}
Break and continue loops
Loop begin 1
Loop end 1
Loop begin 2
Loop begin 3