[comp.lang.ada] Named block inside named loop

stt@ada-uts (10/23/87)

In response to the question about declaring
a named block inside a named loop ...
LRM 5.1:3 says:
   A label name, and similarly a loop or block name, is implicitly
declared at the end of the declarative part of the innermost block
statement, subprogram body, package body, task body, or generic
body that encloses the labeled statement, the named loop statement,
or the named block statement, as the case may be.

This means that when you have:

   procedure xyz is
   begin
      loop_name : loop
          block_name : declare
              X : integer;
          begin
	      . . .
	      
that the "full name" for X is standard.xyz.block_name.X.

Only the loop index, if any, is considered to be declared
as a local of the loop statement.

S. Tucker Taft
Intermetrics, Inc.
Cambridge, MA  02138