DocAda(tm) is a productivity tool of KSCE

Prev | Up | Next | Back | Forward
About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News

5.6 Block Statements

A block_statement encloses a handled_sequence_of_statements optionally preceded by a declarative_part.

Syntax

   
       block_statement ::=
          [block_statement_identifier:]
              [declare
                   declarative_part]
               begin
                   handled_sequence_of_statements
               end [block_identifier];

Static Semantics

A block_statement that has no explicit declarative_part has an implicit empty declarative_part.

Dynamic Semantics

The execution of a block_statement consists of the elaboration of its declarative_part followed by the execution of its handled_sequence_of_statements.

Examples

Example of a block statement with a local variable:

   
       Swap:
          declare
             Temp : Integer;
          begin
             Temp := V; V := U; U := Temp;
          end Swap;

About DocAda Light: Preface / Preliminary / Help / TOC / Copyright
DocAda Online at the Ada Home: Complete RM95 / Updates / News
Prev | Up | Next | Back | Forward


Copyright © 1994-1997 by Kempe Software Capital Enterprises. All Rights Reserved. For comments on this DocAda(tm) hypertext document, please write to KSCE, at docada@ksce.com