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=-1.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6c62a09d5c4609c9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-20 08:17:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!nycmny1-snf1.gtei.net!news.gtei.net!colt.net!newsfeed.icl.net!newsfeed.fjserv.net!opentransit.net!wanadoo.fr!freenix!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: ambiguous names Date: Tue, 20 Aug 2002 10:15:55 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <3D62572C.60309@mbank.com.ua> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1029856622 13086 137.194.161.2 (20 Aug 2002 15:17:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 20 Aug 2002 15:17:02 +0000 (UTC) Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.12 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:28252 Date: 2002-08-20T10:15:55-05:00 The inner A hides the outer A within the scope of the inner A. Thus, there is no ambiguity. ----- Original Message ----- From: "Maxim Reznik" Newsgroups: comp.lang.ada To: Sent: Tuesday, August 20, 2002 9:50 AM Subject: ambiguous names > Trying to understand paragraph 4.1.3.13 of ARM: > > * If the prefix does not denote a package, then it shall be a > *direct_name or an expanded name, and it shall resolve to denote a > *program unit (other than a package), the current instance of a type, a > *block_statement, a loop_statement, or an accept_statement (in the case > *of an accept_statement or entry_body, no family index is allowed); the > *expanded name shall occur within the declarative region of this > *construct. Further, if this construct is a callable construct and the > *prefix denotes more than one such enclosing callable construct, then > *the expanded name is ambiguous, independently of the selector_name. > > I wroute a program: > > procedure A is > B : Boolean; > X : Integer; > > procedure A is > B : Integer; > begin > X := A.B; -- ambiguous ? > end A; > > begin > null; > end A; > > I think there is an ambiguous name A.B in assignment statement. > "A" denotes two procedures and they are callable constructs. > But GNAT doesnt complain. > > Could Ada lawyers explain me my fault and/or give me an example > of ambiguity of a prefix? > > Please > > > _______________________________________________ > comp.lang.ada mailing list > comp.lang.ada@ada.eu.org > http://ada.eu.org/mailman/listinfo/comp.lang.ada >