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,9697af769c7c74cc,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-04-01 17:39:28 PST Newsgroups: comp.lang.ada Path: gmd.de!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!udel!news.intercon.com!psinntp!scylla!davidg From: davidg@oracorp.com (David Guaspari) Subject: Language lawyer needed Message-ID: <1993Apr1.215753.3147@oracorp.com> Sender: davidg@oracorp.com (David Guaspari) Organization: ORA Corporation, Ithaca, New York Distribution: usa Date: Thu, 1 Apr 1993 21:57:53 GMT Date: 1993-04-01T21:57:53+00:00 List-Id: Here's a question for language lawyers. Consider the following pathological program: procedure Q(x : integer) is begin declare x : integer; -- (1) begin Q(x => 0); -- (2) end; end Q; My question concerns the legality of Q (forgetting about the fact that its execution won't terminate). One way to apply chapter 8 in the reference manual goes as follows: The declaration of x in (1) hides the declaration of x as a formal parameter of Q. Therefore, by the visibility rules, the occurrence of x in (2) has exactly one possible meaning, namely that given by the declaration in (1). However, the declaration in (1) is not visible by selection at the point at which x occurs in (2). Therefore the call in (2) is illegal. One the other hand, at least one compiler (Telesoft) thinks that Q is legal, an outcome that seems a reasonable enough outcome to common sense untutored by the reference manual. So, what *is* the right answer, and how do we get it from the RM? - David Guaspari davidg@oracorp.com