diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/language%2Fcontinue.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/language%2Fcontinue.html')
| -rw-r--r-- | devdocs/c/language%2Fcontinue.html | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/devdocs/c/language%2Fcontinue.html b/devdocs/c/language%2Fcontinue.html deleted file mode 100644 index 831fd254..00000000 --- a/devdocs/c/language%2Fcontinue.html +++ /dev/null @@ -1,61 +0,0 @@ - <h1 id="firstHeading" class="firstHeading">continue statement</h1> <p>Causes the remaining portion of the enclosing <a href="for" title="c/language/for">for</a>, <a href="while" title="c/language/while">while</a> or <a href="do" title="c/language/do"> do-while</a> loop body to be skipped.</p> -<p>Used when it is otherwise awkward to ignore the remaining portion of the loop using conditional statements.</p> -<h3 id="Syntax"> Syntax</h3> <table class="t-sdsc-begin"> <tr class="t-sdsc"> <td class="t-sdsc-nopad"> <span class="t-spar">attr-spec-seq</span><span class="t-mark">(optional)</span> <code>continue</code> <code>;</code> </td> <td class="t-sdsc-nopad"> </td> <td class="t-sdsc-nopad"> </td> -</tr> -</table> <table class="t-par-begin"> <tr class="t-par"> <td> <span class="t-spar">attr-spec-seq</span> </td> <td> - </td> <td> <span class="t-mark-rev t-since-c23">(C23)</span>optional list of <a href="attributes" title="c/language/attributes">attributes</a>, applied to the <code>continue</code> statement </td> -</tr> -</table> <h3 id="Explanation"> Explanation</h3> <p>The <code>continue</code> statement causes a jump, as if by <a href="goto" title="c/language/goto">goto</a>, to the end of the loop body (it may only appear within the loop body of <a href="for" title="c/language/for">for</a>, <a href="while" title="c/language/while">while</a>, and <a href="do" title="c/language/do">do-while</a> loops).</p> -<p>For <a href="while" title="c/language/while">while</a> loop, it acts as</p> -<div class="c source-c"><pre data-language="c">while (/* ... */) { - // ... - continue; // acts as goto contin; - // ... - contin:; -}</pre></div> <p>For <a href="do" title="c/language/do">do-while</a> loop, it acts as:</p> -<div class="c source-c"><pre data-language="c">do { - // ... - continue; // acts as goto contin; - // ... - contin:; -} while (/* ... */);</pre></div> <p>For <a href="for" title="c/language/for">for</a> loop, it acts as:</p> -<div class="c source-c"><pre data-language="c">for (/* ... */) { - // ... - continue; // acts as goto contin; - // ... - contin:; -}</pre></div> <h3 id="Keywords"> Keywords</h3> <p><a href="../keyword/continue" title="c/keyword/continue"><code>continue</code></a></p> -<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include <stdio.h> - -int main(void) -{ - for (int i = 0; i < 10; i++) { - if (i != 5) continue; - printf("%d ", i); // this statement is skipped each time i != 5 - } - - printf("\n"); - - for (int j = 0; j < 2; j++) { - for (int k = 0; k < 5; k++) { // only this loop is affected by continue - if (k == 3) continue; - printf("%d%d ", j, k); // this statement is skipped each time k == 3 - } - } -}</pre></div> <p>Output:</p> -<div class="text source-text"><pre data-language="c">5 -00 01 02 04 10 11 12 14</pre></div> </div> <h3 id="References"> References</h3> <ul> -<li> C17 standard (ISO/IEC 9899:2018): </li> -<ul><li> 6.8.6.2 The continue statement (p: 111) </li></ul> -<li> C11 standard (ISO/IEC 9899:2011): </li> -<ul><li> 6.8.6.2 The continue statement (p: 153) </li></ul> -<li> C99 standard (ISO/IEC 9899:1999): </li> -<ul><li> 6.8.6.2 The continue statement (p: 138) </li></ul> -<li> C89/C90 standard (ISO/IEC 9899:1990): </li> -<ul><li> 3.6.6.2 The continue statement </li></ul> -</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/language/continue" title="cpp/language/continue">C++ documentation</a></span> for <span class=""><span><code>continue</code> statement</span></span> </td> -</tr> </table> <div class="_attribution"> - <p class="_attribution-p"> - © cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br> - <a href="https://en.cppreference.com/w/c/language/continue" class="_attribution-link">https://en.cppreference.com/w/c/language/continue</a> - </p> -</div> |
