The continue statement orders the program to skip to the end of the loop
and begins the next iteration of the loop. In the while and do-while loops,
the continue statement forces the condition-expression to be executed imme-
diately. In the for loop, control passes to the update-expression.
•
Example
char a[10],b[10],i,j;
for (i=j=0;i<10;i++)// copy data from b[ ] to a[ ],skip blanks
{
if
(b[i]==0)
break;
if (b[i]==0
×
20)continue;
a[j++]==b[i];
}
→
goto statement and label
•
Syntax
See the Syntax for switch statement
•
Description
A label has the same form as a variable name, but followed by a colon. It
can be attached to any statement in the same function as the goto
statement. The scope of a label is the entire function.
•
Example
See the switch statement example
→
switch statement
•
Syntax
switch
(
variable)
{
case
constant1:
statement1;
break
;
case
constant2:
statement2;
goto
Label1;
case
constant3:
statement3;
break
;
default
:
statement;
Labell:
statement4;
break
;
}
Chapter 9 Holtek C Language
97
Summary of Contents for HT-IDE
Page 11: ...P a r t I Integrated Development Environment Part I Integrated Development Environment 1 ...
Page 12: ...HT IDE User s Guide 2 ...
Page 20: ...Fig 1 6 Fig 1 7 HT IDE User s Guide 10 ...
Page 24: ...HT IDE User s Guide 14 ...
Page 70: ...HT IDE User s Guide 60 ...
Page 76: ...HT IDE User s Guide 66 ...
Page 92: ...HT IDE User s Guide 82 ...
Page 93: ...P a r t I I Development Language and Tools Part II Development Language and Tools 83 ...
Page 94: ...HT IDE User s Guide 84 ...
Page 148: ...HT IDE User s Guide 138 ...
Page 150: ...Fig 12 1 Fig 12 2 HT IDE User s Guide 140 ...
Page 154: ...HT IDE User s Guide 144 ...
Page 192: ...HT IDE User s Guide 182 ...
Page 194: ...HT IDE User s Guide 184 ...
Page 218: ...HT IDE User s Guide 208 ...
Page 235: ...P a r t V Appendix Part V Appendix 225 ...
Page 236: ...HT IDE User s Guide 226 ...
Page 250: ...HT IDE User s Guide 240 ...