while loop
De cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Exécute une boucle .
Original:
Executes a loop.
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.
Utilisé lorsque le code doit être exécuté plusieurs fois tant qu'une condition est présent .
Original:
Used where code needs to be executed several times while some condition is present.
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.
Sommaire |
[modifier] Syntaxe
while ( cond_expression ) loop_statement
|
|||||||||
[modifier] Explication
cond_expression doit être une expression dont le résultat est convertible en bool. Il est évaluée avant chaque exécution de loop_statement, qui est exécutée seulement si le cond_expression évalue à true .
Original:
cond_expression shall be an expression, whose result is convertible to bool. It is evaluated before each execution of loop_statement, which is only executed if the cond_expression evaluates to true.
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.
Si l'exécution de la boucle doit être mis fin à un certain moment, <div class="t-tr-text"> instruction break
peut être utilisé comme terminaison déclaration . Original:
break statement
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:
If the execution of the loop needs to be terminated at some point,
instruction break</div> can be used as terminating statement.
Original:
break statement
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.
Si l'exécution de la boucle doit être poursuivie à la fin de la boucle, <div class="t-tr-text"> instruction continue
peut être utilisé comme raccourci .Original:
continue statement
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:
If the execution of the loop needs to be continued at the end of the 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.