Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/language/continue"

From cppreference.com
< cpp‎ | language
m (Text replace - " return 0; }" to "}")
(Keywords: +)
Line 18: Line 18:
  
 
===Keywords===
 
===Keywords===
 
+
{{dcl list begin}}
{{ltt|cpp/keywords/continue}}
+
{{dcl list template | cpp/language/dcl list continue}}
 +
{{dcl list end}}
  
 
===Example===
 
===Example===

Revision as of 05:52, 21 September 2011

Template:cpp/language/sidebar Causes the remaining portion of the nearest for, while or do-while loop body skipped.

Used when it is otherwise awkward to ignore the remaining portion of the loop using conditional statements.

Contents

Syntax

continue

Explanation

This statement works as a shortcut to the end of the nearest loop body.

In case of while or do-while loops, the next statement executed is the condition check (Template:sparam). In case of for loop, the next statements executed are the iteration expression and condition check (Template:sparam, Template:sparam). After that the loop continues as normal.

Keywords

Template:cpp/language/dcl list continue

Example

Template:example cpp