comp.lang.ada
 help / color / mirror / Atom feed
From: graham@clsi.COM (Paul Graham)
Subject: Re: Change to obscure visibility rule in 9x
Date: 20 Oct 1994 04:01:51 GMT
Date: 1994-10-20T04:01:51+00:00	[thread overview]
Message-ID: <GRAHAM.94Oct20000151@canopus.clsi.COM> (raw)
In-Reply-To: bobduff@dsd.camb.inmet.com's message of Tue, 18 Oct 1994 17:38:30 GMT


>     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.

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.

> None of this makes much difference to anybody except a language lawyer.

I'm a VHDL language lawyer.  I figure I can get help from the Ada Bar
Association.

Paul
--
Paul Graham 	graham@compass-da.com	Compass Design Automation, Inc.
(speaking only for myself)	"Cekoslovakyalilastiramadiklarimizdanmissiniz."



  reply	other threads:[~1994-10-20  4:01 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 [this message]
     [not found]   ` <GRAHAM.94Oct20000151@canopus.clsi.com>
1994-10-20 14:46     ` Bob Duff
     [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