next up previous
suivant: Declarations monter: Grammaire de C++ précédent: Expressions

Statements


statement:  

labeled-statement
expression-statement
compound-statement
selection-statement
iteration-statement
jump-statement
declaration-statement
try-block

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

expression-statement:
expression$_{\mathsf{opt}}$ ;

compound-statement:
{ statement-seq$_{\mathsf{opt}}$ }

statement-seq:
statement
statement-seq statement

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

condition:
expression
type-specifier-seq declarator = assignment-expression


iteration-statement:
while ( condition ) statement
do statement while ( expression ) ;
for ( for-init-statement condition$_{\mathsf{opt}}$ ; expression$_{\mathsf{opt}}$ ) statement

for-init-statement:
expression-statement
simple-declaration

jump-statement:
break ;
continue ;
return expression$_{\mathsf{opt}}$ ;
goto identifier ;

declaration-statement:
block-declaration



R Lalement
1999-09-16