Share via


Riepilogo delle istruzioni C

statement:
labeled-statement
compound-statement
expression-statement
selection-statement
iteration-statement
jump-statement
try-except-statement /* Microsoft-specific */
try-finally-statement /* Microsoft-specific */

jump-statement:
goto identifier ;
continue ;
break ;
returnexpressionOptare;
__leave ; /* Specifico di Microsoft1 */

compound-statement:
{declaration-listOptarestatement-listOptare}

declaration-list:
declaration
declaration-list declaration

statement-list:
statement
statement-list statement

expression-statement:
expressionOptare;

iteration-statement:
while ( expression ) statement
do statement while ( expression ) ;
for (expressionOptare;expressionOptare;expressionOptare)statement

selection-statement:
if ( expression ) statement
if ( expression ) statement else statement
switch ( expression ) statement

labeled-statement:
identifier : statement
case constant-expression : statement
default : statement

try-except-statement: /* Microsoft-specific */
__try compound-statement __except ( expression ) compound-statement

try-finally-statement: /* Microsoft-specific */
__try compound-statement __finally compound-statement

1 La __leave parola chiave è valida solo all'interno del __try blocco di un try-finally-statementtry-except-statement oggetto o .

Vedi anche

Grammatica di struttura della frase