From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,57228cde5a9481bb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-20 08:19:35 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!swrinde!sgiblab!uhog.mit.edu!news.mathworks.com!noc.near.net!inmet!dsd!bobduff From: bobduff@dsd.camb.inmet.com (Bob Duff) Subject: Re: Change to obscure visibility rule in 9x Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: Date: Thu, 20 Oct 1994 14:46:00 GMT Date: 1994-10-20T14:46:00+00:00 List-Id: In article , Paul Graham 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.)