DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
C language compiler

Jump statements

goto

   goto identifier;

break

Terminates nearest enclosing switch, while, do, or for statement. Passes control to the statement following the terminated statement. Example:

   for (i=0; i<n; i++) {
      if ((a[i] = b[i]) == 0)
         break;	/* exit for */
   }

continue

Goes to top of smallest enclosing while, do, or for statement, causing it to reevaluate the controlling expression. A for loop's expression3 is evaluated before the controlling expression. It can be thought of as the opposite of the break statement. Example:

   for (i=0; i<n; i++) {
      if (a[i] != 0)
         continue;
      a[i] = b[i];
      k++;
   }

return

   return;
   return expression;

Next topic: Portability considerations
Previous topic: for

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003