Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>continue</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  CONTINUE

  The continue statement is used within a loop (while, do...while, or
  for statement). The continue statement has the form:

       continue;

  It is illegal for a continue statement to appear outside of a loop
  body. When a continue statement is encountered, program control is
  immediately transferred to the end of the body of the innermost en-
  closing while, do...while, or for statement. The effect in a while
  or do...while statement is that the condition part of the while or
  do...while statement is evaluated, and the next iteration of the
  loop occurs. For example:

       num = 0;
       while (num < 100000)
        {
         num = num + 1;
         if (num > 100)
          continue;
         prints("Hello");
        }


  The effect of the continue statement in the above loop would be that
  'Hello' would only be printed while 'num' was smaller or equal to
  100, as the continue statement is executed when num is bigger than
  100, which causes the rest of the loop body to be skipped. An ex-
  ample for statement would be:

       for (num = 0; num < 100000; num = num + 1)
        {
         if (num > 100)
          continue;
         prints("Hello");
        }

  The effect in this case would be the same. While 'num' is smaller or
  equal to 100, the entire loop body executes. If 'num' is greater
  than 100 however, the continue statement is executed. This causes
  the rest of the loop body to be skipped, so the 'Hello' is then not
  printed.

See Also: break do for while

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson