Contents Index Previous Next
5.6 Block Statements
encloses a handled_sequence_of_statements
optionally preceded by a declarative_part.]
If a block_statement
has a block_statement_identifier,
then the identifier shall be repeated
after the end; otherwise, there shall not be an identifier
after the end.
that has no explicit declarative_part
has an implicit empty declarative_part.
Ramification: Thus, other
rules can always refer to the declarative_part
of a block_statement.
The execution of a block_statement
consists of the elaboration of its declarative_part
followed by the execution of its handled_sequence_of_statements
Example of a
block statement with a local variable:
Temp : Integer;
Temp := V; V := U; U := Temp;
Ramification: If task objects are
declared within a block_statement whose
execution is completed, the block_statement
is not left until all its dependent tasks are terminated (see 7.6).
This rule applies to completion caused by a transfer of control.
Within a block_statement,
the block name can be used in expanded names denoting local entities such as
Swap.Temp in the above example (see 4.1.3).
Wording Changes from Ada 83
The syntax rule for block_statement
now uses the syntactic category handled_sequence_of_statements.
Contents Index Previous Next Legal