C Programming on the IBM PC (C Programmers Reference Guide Series)

continue

continue is used to bypass portions of code in a loop and forces the conditional expression to be evaluated. For example, the following while loop reads characters from the keyboard until an s is typed:

while(ch = getchar()) {  if(ch != 's') continue;  // read another char  process(ch); }

The call to process( ) will not occur until ch contains the character s.

Категории