Block statements

A block statement, or compound statement, lets you group any number of data definitions, declarations, and statements into one statement. All definitions, declarations, and statements enclosed within a single set of braces are treated as a single statement. You can use a block wherever a single statement is allowed.

Block statement syntax

Read syntax diagramSkip visual syntax diagram{ type_definitionfile_scope_data_declarationblock_scope_data_declaration statement}

A block defines a local scope. If a data object is usable within a block and its identifier is not redefined, all nested blocks can use that data object.