Page t026, go to NEXT,
PREVIOUS, INDEX
break and
continue Statements
Need to break out of loop and to continue with next iteration
for ( i = 0; i < count; i++ )
{ if ( i == j ) continue;
if ( i < j ) break;
/* do some work */
}
- continue goes to next iteration of current loop
- break steps out of current loop
- goto exists, but is rarely used
C Course, 21-jan-1997,
Peter Klok,
pfk@hef.kun.nl