comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@dsd.camb.inmet.com (Bob Duff)
Subject: Re: Change to obscure visibility rule in 9x
Date: Thu, 20 Oct 1994 14:46:00 GMT
Date: 1994-10-20T14:46:00+00:00	[thread overview]
Message-ID: <Cxz7op.9C0@inmet.camb.inmet.com> (raw)
In-Reply-To: GRAHAM.94Oct20000151@canopus.clsi.com

In article <GRAHAM.94Oct20000151@canopus.clsi.com>,
Paul Graham <graham@clsi.COM> wrote:
>
>>     29.j   The scope of a subprogram does not start until after its profile.
>> 	 Thus, the following is legal:
>> 
>>  29.k        X : constant Integer := 17;
>> 	     procedure X(Y : in Integer := X);
>
>
>By my reading of Ada 83 RM 8.3(16), the above example should be illegal.
>The rule says that every declaration with same designator ("X") as the
>subprogram is hidden.  In particular, neither constant "X" or procedure "X"
>is visible in the parameter list.

That's right.  It was illegal in Ada 83, but legal in Ada 9X.  The above
quote comes from the Annotated Ada 9X Reference Manual, not the 83 RM.

>I agree that the 9x rules make example 29.k legal, by letting the name "X"
>in the parameter list refer to the constant "X", but I don't see how it can
>be legal in Ada 83.

Sorry if I mislead you.  I did *not* mean to say it was legal in Ada 83.
The original question was why was RM83-8.3(16) removed in Ada 9X, and I
was attempting to explain why.
-- 
Bob Duff                                bobduff@inmet.com
Oak Tree Software, Inc.
Ada 9X Mapping/Revision Team (Intermetrics, Inc.)



  parent reply	other threads:[~1994-10-20 14:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <GRAHAM.94Oct18094458@clsi.clsi.com>
1994-10-18 17:38 ` Change to obscure visibility rule in 9x Bob Duff
1994-10-20  4:01   ` Paul Graham
     [not found]   ` <GRAHAM.94Oct20000151@canopus.clsi.com>
1994-10-20 14:46     ` Bob Duff [this message]
     [not found] <INFO-ADA%94101904360935@vm1.nodak.edu>
1994-10-19 12:33 ` Bob Duff
1994-10-19  9:39 Simtel20 Transfer
  -- strict thread matches above, loose matches on Subject: below --
1994-10-18 13:44 Paul Graham
1994-10-18 15:23 ` Robert I. Eachus
replies disabled

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