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 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!SEI.CMU.EDU!Marc.Graham From: Marc.Graham@SEI.CMU.EDU Newsgroups: comp.lang.ada Subject: Expanded names Message-ID: <9009241814.AA08734@bx.sei.cmu.edu> Date: 24 Sep 90 18:14:09 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: The following Ada code compiles cleanly and produces the output "Inner". Question: Is there any way that the outer outer_constant may be named from the inner testnames? If no, then why is 4.1.3 rule f (in particular, para 18 and 19) worded the way it is? (Note: if the outer testnames were a procedure, rather than a package, the expanded name testnames.outer_context is illegal within the inner testnames.) ------------------------------------------------------------ package testnames is procedure testnames (outer_constant : integer); end testnames; with text_io; use text_io; package body testnames is outer_constant : constant := 3.14159; procedure testnames (outer_constant : integer) is begin if testnames.outer_constant > 2 then put_line("Outer!"); else put_line("Inner"); end if; end testnames; end testnames; with testnames; procedure exectest is begin testnames.testnames(1); end exectest; ------------------------------------------------------------ Marc H. Graham Software Engineering Institute marc@sei.cmu.edu Carnegie Mellon University (412) 268 7784 Pittsburgh, PA 15213