| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
<html> |
| 15 |
<head> |
| 16 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 17 |
<meta http-equiv="Content-Language" content="en-us"> |
| 18 |
<title>continue</title> |
| 19 |
</head> |
| 20 |
<body bgcolor="#DAD3C5" vlink="#0094D2" link="#003258"> |
| 21 |
<table align="left" border="0" cellspacing="0" cellpadding="0" valign=top> |
| 22 |
<tr> |
| 23 |
<td width=105 height=40><a href="https://projects.eclipse.org/projects/tools.titan"><img src="../images/titan_transparent.gif" border=0 width=105 height=40 align="left" alt="Titan"></a></td> |
| 24 |
</tr> |
| 25 |
</table> |
| 26 |
<table border="0" align="right" cellpadding="0" cellspacing="0"> |
| 27 |
<tr> |
| 28 |
<td><a href="../titan_main.html" alt="contents"><img border="0" src="../images/ao.jpg" width="53" height="40"></a></td> |
| 29 |
<td><a href="../titan_index.html" alt="index"><img border="0" src="../images/up.jpg" width="53" height="40"></a></td> |
| 30 |
<td><a href="const.html" alt="previous"><img border="0" src="../images/left.jpg" width="53" height="40"></a></td> |
| 31 |
<td><a href="control.html" alt="next"><img border="0" src="../images/right.jpg" width="53" height="40"></a></td> |
| 32 |
</tr> |
| 33 |
</table> |
| 34 |
<p><br clear="all"> |
| 35 |
</p> |
| 36 |
<hr> |
| 37 |
<h1>continue</h1> |
| 38 |
<hr align="left" width="75%"> |
| 39 |
<p>The keyword is used in loops.</p> |
| 40 |
<p>The <font face="Courier New"><b>continue</b></font> statement may only be used inside the body of a loop (<font face="Courier New"><b>for</b></font>, <font face="Courier New"><b>while</b></font>, |
| 41 |
<font face="Courier New"><b>do-while</b></font>).</p> |
| 42 |
<p>On executing a <font face="Courier New"><b>continue</b></font> statement, the subsequent statements of the body of the innermost, currently executed loop are skipped and the next iteration |
| 43 |
starts.</p> |
| 44 |
<hr align="left" width="50%"> |
| 45 |
<p>Related keyword:</p> |
| 46 |
<ul> |
| 47 |
<li><a href="for.html"><b><font face="Courier New" color="#003258" size="4">for</font></b></a></li> |
| 48 |
<li><a href="while.html"><b><font face="Courier New" color="#003258" size="4">while</font></b></a></li> |
| 49 |
<li><a href="do.html"><b><font face="Courier New" color="#003258" size="4">do-while</font></b></a></li> |
| 50 |
</ul> |
| 51 |
<hr align="left" width="50%"> |
| 52 |
<div align="center"> |
| 53 |
<center> |
| 54 |
<table border="0" width="90%" bgcolor="#FFB599" cellpadding="4"> |
| 55 |
<tr> |
| 56 |
<td width="100%"> |
| 57 |
<h3 align="center"><font face="Courier New" color="#003258" size="5"><b>continue;</b></font></h3> |
| 58 |
</td> |
| 59 |
</tr> |
| 60 |
</table> |
| 61 |
</center> |
| 62 |
</div> |
| 63 |
<hr align="left" width="25%"> |
| 64 |
<P>Example: |
| 65 |
<p><code> do {<br> |
| 66 |
/* ... */<br> |
| 67 |
if (cond1) { continue; /* execution continues with the next iteration of the do-while-loop */ }<br> |
| 68 |
/* ... */<br> |
| 69 |
for (var integer j:=1; j<=10; j:= j+1) {<br> |
| 70 |
/* ... */<br> |
| 71 |
if (cond2) { continue; /* continues with the next iteration of the for-loop */ }<br> |
| 72 |
/* ... */<br> |
| 73 |
}<br> |
| 74 |
/* ... */<br> |
| 75 |
}<br></p> |
| 76 |
</code> |
| 77 |
<hr align="left" width="25%"> |
| 78 |
<p><a HREF="BNF.html#continuestatement">BNF definition</a> of <font face="Courier New">continue</font></p> |
| 79 |
</body> |
| 80 |
</html> |