continue statement
Da cppreference.com.
![]() | Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate. La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
Provoca la parte rimanente del racchiude for, range-for, while o loop <div class="t-tr-text"> do-while
corpo saltato.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.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
Causes the remaining portion of the enclosing for, range-for, while or
do-while</div> loop body skipped.
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.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Usato quando è altrimenti difficile da ignorare la parte restante del loop usando istruzioni condizionali.
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.
You can help to correct and verify the translation. Click here for instructions.
Indice |
[modifica]Sintassi
continue | |||||||||
[modifica]Spiegazione
Questa istruzione funziona come un collegamento alla fine del corpo del ciclo contiene.
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.
You can help to correct and verify the translation. Click here for instructions.
In caso di while o <div class="t-tr-text"> do-while
loop, l'istruzione successiva eseguito è il controllo di condizione (cond_expression). In caso di ciclo for, le dichiarazioni successive eseguite sono l'espressione di iterazione e verificare lo stato (iteration_expression, cond_expression). Dopo che il ciclo continua normalmente.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.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
In case of while or
do-while</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.
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.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[modifica]Parole chiave
[modifica]Esempio
#include <iostream> int main(){for(int i =0; i <10; i++){if(i !=5)continue;std::cout<< i <<" ";//this statement is skipped each time i!=5} std::cout<<'\n'; for(int j =0; j <2; j++){for(int k =0; k <5; k++){//only this loop is affected by continueif(k ==3)continue;std::cout<< j << k <<" ";//this statement is skipped each time k==3}}}
Output:
5 00 01 02 04 10 11 12 14