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.9 required=5.0 tests=BAYES_00,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,78ec96be17741f16 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Sat, 17 Sep 2005 17:03:17 -0500 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Unclear error message - please help References: <432C8690.C37D4AE0@alfred-hilscher.de> Date: Sun, 18 Sep 2005 00:02:49 +0200 Message-ID: <87k6hf9wty.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:IPeqK+y7QKguGLb4WXqNLQAsYSQ= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 83.134.240.175 X-Trace: sv3-HmrY+v+L43Azvl1fpCkJuUhIdqyMUnGCu7ZLW7u30VeHmZPiUm+q5jLt3cu1mgooA4qiiIB3a2DeIyP!K+abD1WCdJsK94utK39JfgW6Qhj0fcubuPSj0llQgx7ohPw6LMKkmpuwB3TMCvePjDVs4n+cJPs= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:4848 Date: 2005-09-18T00:02:49+02:00 List-Id: Alfred Hilscher writes: > The compiler says, that the procedure call is ambigous, but I think, it > is clear, that "Proc" from line 2 should be used, as it has parameters > (in, out, in) while "Proc" from line 4 has (in, out, out). And the value > (2507) in the call of "Proc" can not be used as an "out" parameter. It > this a know error, or do I have strong misunderstandings there? > > pkgtest.adb:15:03: ambiguous expression (cannot resolve "Proc") > pkgtest.adb:15:03: possible interpretation at pkg.ads:4 > pkgtest.adb:15:03: possible interpretation at pkg.ads:2 The compiler is correct, because the mode (in, out or in out) is not considered when resolving overloading. See the Annotated (not plain) Ada Reference Manual, 6.4.1(5). You can resolve the overloading by using named parameter association: Proc (Host => Argument (1), RC => RC, Identifier => 2507); -- Ludovic Brenta.