Espaces de noms
Variantes
Affichages
Actions

continue statement

De cppreference.com
< c‎ | language

 
 
Langage C
Les sujets généraux
Original:
General topics
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Preprocessor
Commentaires
Mots-clés
Table ASCII
Séquences d'échappement
Histoire de C
Le contrôle de flux
Original:
Flow control
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
États d'exécution conditionnelles
Original:
Conditional execution statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Des instructions d'itération
Original:
Iteration statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Aller déclarations
Original:
Jump statements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
continue statement
break statement
Fonctions
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
déclaration de la fonction
spécificateur inline
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Les prescripteurs
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
prescripteurs cv
classe de stockage prescripteurs
alignas spécificateur (C99)
Littéraux
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Expressions
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ordre d'évaluation
les opérateurs alternatifs
opérateurs
la priorité des opérateurs
Utilitaires
Original:
Utilities
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
typedef declaration
attributs (C99)
jette
Divers
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Assembleur inline
 
sauté .
Original:
Utilisé quand il en est autrement difficile à ignorer le reste de la boucle à l'aide des instructions conditionnelles .
Original:
Used when it is otherwise awkward to ignore the remaining portion of the loop using conditional statements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Sommaire

[modifier] Syntaxe

continue

[modifier] Explication

Cette déclaration fonctionne comme un raccourci vers la fin du corps de la boucle entourant .
Original:
This statement works as a shortcut to the end of the enclosing loop body.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
boucles, l'instruction suivante exécutée est la vérification de l'état (cond_expression). Dans le cas de la boucle for, les déclarations suivantes sont exécutées l'expression d'itération et de vérification de l'état (iteration_expression, cond_expression). Après que la boucle se poursuit normalement .
Original:
In case of while or
do-while
Original:
do-while
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
</div>
loops, the next statement executed is the condition check (cond_expression). In case of for loop, the next statements executed are the iteration expression and condition check (iteration_expression, cond_expression). After that the loop continues as normal.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[modifier] Mots-clés

continue

[modifier] Exemple

#include <stdio.h>
 
int main() 
{
    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
        }
    }
}

Résultat :

5
00 01 02 04 10 11 12 14