comp.lang.ada
 help / color / mirror / Atom feed
From: stt@ada-uts
Subject: Named block inside named loop
Date: Fri, 23-Oct-87 12:18:00 EST	[thread overview]
Date: Fri Oct 23 12:18:00 1987
Message-ID: <57900049@ada-uts> (raw)


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

                 reply	other threads:[~1987-10-23 17:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox