Compartir a través de


Resumen de instrucciones de C

statement:
labeled-statement
compound-statement
expression-statement
selection-statement
iteration-statement
jump-statement
try-except-statement /* Específico de Microsoft */
try-finally-statement /* Específico de Microsoft */

jump-statement:
goto identifier ;
continue ;
break ;
returnoptexpression ;
__leave ; /* Específico de Microsoft1 */

compound-statement:
{ declaration-listopt statement-listopt }

declaration-list:
declaration
declaration-list declaration

statement-list:
statement
statement-list statement

expression-statement:
expressionopt ;

iteration-statement:
while ( expression ) statement
do statement while ( expression ) ;
for ( expressionopt ; expressionopt ; expressionopt ) 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: /* Específico de Microsoft */
__try compound-statement __except ( expression ) compound-statement

try-finally-statement: /* Específico de Microsoft */
__try compound-statement __finally compound-statement

1 La palabra clave __leave solo es válida en el bloque __try de try-except-statement o try-finally-statement .

Consulte también

Gramática de la estructura de la frase