comp.lang.ada
 help / color / mirror / Atom feed
From: "Justin Schaub" <none>
Subject: Procedure Overloading
Date: Thu, 24 Jul 2003 20:49:45 GMT
Date: 2003-07-24T20:49:45+00:00	[thread overview]
Message-ID: <HIJr6x.CFK@news.boeing.com> (raw)

Is there a way to specify which overloaded procedure is called in the
following example?

package A

type Access_Integer is access Integer;

procedure compute( Num : access Integer);
procedure compute(Num : Access_Integer);

end A;

procedure Test is
   B : Access_Integer;
begin
   compute(B);
end Test;

The GNAT compiler allows compilation of the package A, but when compiling
the procedure B it says that there is an ambiguous reference to the
overloaded compute function.

I have heard that you could simply do

compute (Access_Integer'(B));

but that didn't work either.  Any ideas?  I know it's a silly example but we
are importing the ADA GLU bindings that have a similar issue.

Justin





             reply	other threads:[~2003-07-24 20:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-24 20:49 Justin Schaub [this message]
2003-07-25  7:57 ` Procedure Overloading Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2003-07-25  5:57 christoph.grein
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox