while loop
cppreference.com
[] |
Google. . , . , . |
<metanoindex/>
.
, , .
while ( cond_expression ) loop_statement
|
|||||||||
cond_expression ,
bool. loop_statement, , cond_expression true.:
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. - , .
:
break statement
[http://translate.google.com Google].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
:
If the execution of the loop needs to be terminated at some point, can be used as terminating statement.
:
break statement
[http://translate.google.com Google].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
, , .
:
continue statement
[http://translate.google.com Google].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
:
If the execution of the loop needs to be continued at the end of the loop body, can be used as shortcut.
:
continue statement
[http://translate.google.com Google].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
. [http://en.cppreference.com/w/Cppreference:MachineTranslations ].
| : |