while loop

Da cppreference.com.
< c‎ | language

 
 
Linguaggio C
Temi generali
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.
Preprocessore
Commenti
Parole chiave
Tabella ASCII
Sequenze di escape
Storia di C
Controllo del flusso
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.
Dichiarazioni esecuzione condizionale
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.
Iterazione dichiarazioni
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.
while loop
do-while loop
Vai dichiarazioni
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.
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dichiarazione di funzione
specificatore inline
Tipi
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Specifiers
Original:
Specifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cv specificatori
della classe di archiviazione specificatori
alignas specificatore(C99)
Letterali
Original:
Literals
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Espressioni
Original:
Expressions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ordine di valutazione
operatori alternativi
operatori
precedenza degli operatori
Utilities
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
attributi(C99)
getta
Varie
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Montaggio in linea
 
Esegue un ciclo.
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.
Usato in cui il codice deve essere eseguito più volte, mentre una certa condizione è presente.
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.

Indice

[modifica]Sintassi

while (cond_expression)loop_statement

[modifica]Spiegazione

cond_expression deve essere un'espressione, il cui risultato è convertibile in bool. Si è valutata prima di ogni esecuzione di loop_statement, che viene eseguito solo se il cond_expression restituisce 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.
può essere utilizzato come terminale dichiarazione.
Original:
If the execution of the loop needs to be terminated at some point,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
può essere utilizzato come collegamento.
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.

[modifica]Parole chiave

while

[modifica]Esempio

close