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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed.arcor.de!news.arcor.de!not-for-mail Message-ID: <432C8690.C37D4AE0@alfred-hilscher.de> Date: Sat, 17 Sep 2005 23:11:44 +0200 From: Alfred Hilscher Organization: none X-Mailer: Mozilla 4.75 [de] (WinNT; U) X-Accept-Language: de MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Unclear error message - please help Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 17 Sep 2005 23:11:39 MEST NNTP-Posting-Host: d590e3f8.newsread2.arcor-online.net X-Trace: DXC=H;BkQTXn?D9BSA]l4RVUFY4:\7`mfobaMi:^on]OSn;ah9LWeMZ50XiK4P[b X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4844 Date: 2005-09-17T23:11:39+02:00 List-Id: Hello, I have a problem with some code I've written. The compiler (GNAT 3.15p on Windows) reports an error whereas I think it should not. Package spec: package Pkg is procedure Proc (Host : STRING; RC : out Integer; Identifier : in Integer := 0); procedure Proc (Host : STRING; Time_Response : out Integer; RC : out Integer; Time_Wait : Integer := 1000; Identifier : Integer := 0); end Pkg; Main program: with Text_IO; with Ada.Command_Line; use Ada.Command_Line; with Pkg; use Pkg; procedure PkgTest is RC : Integer; begin if Argument_Count /= 1 then Text_IO.Put_Line ("call: PkgTest "); return; end if; Proc (Argument (1), RC, 2507); Text_IO.Put_Line ("RC=" & Integer'Image (RC)); end PkgTest; 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 -- ----------------------------------------------------- To send me mail, please replace "Spam" by "Jedermann" -----------------------------------------------------