RAD Studio |  |

Statements

Statements specify the flow of control as a program executes. In the absence of specific jump and selection statements, statements are executed sequentially in the order of appearance in the source code. CodeGear C++ statements shows the syntax for statements.

CodeGear C++ statements

statement | labeled-statement compound-statement expression-statement selection-statement iteration-statement jump-statement asm-statement declaration (C++ specific)
labeled-statement: | identifier : statement case constant-expression : statement default : statement
compound-statement: | { <declaration-list> <statement-list> }
declaration-list: | declaration declaration-list declaration
statement-list: | statement statement-list statement
expression-statement: | <expression> ;
asm-statement: | asm tokens newline asm tokens; asm { tokens; <tokens;>= <tokens;>}
selection-statement: | if ( expression ) statement if ( expression ) statement else statement switch ( expression ) statement
iteration-statement: | while ( expression ) statement do statement while ( expression ) ; for (for-init-statement <expression> ; <expression>) statement
for-init-statement: | expression-statement declaration (C++ specific)
jump-statement: | goto identifier ; continue ; break ; return <expression> ;

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!