comp.lang.ada
 help / color / mirror / Atom feed
From: Dmitry A. Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: Overloading procedures with Float and Long_Float types
Date: Mon, 08 Mar 2004 11:10:45 +0100
Date: 2004-03-08T11:10:45+01:00	[thread overview]
Message-ID: <pdho40lo4i3uhhmrd2uqtl847ss14jq642@4ax.com> (raw)
In-Reply-To: pan.2004.03.08.09.05.58.695141@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk

On Mon, 08 Mar 2004 09:06:00 +0000, "Luke A. Guest"
<laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> wrote:

>On Mon, 08 Mar 2004 08:20:19 +0000, Preben Randhol wrote:
>
>> On 2004-03-08, Luke A. Guest <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> wrote:
>>> On Mon, 08 Mar 2004 03:49:03 +0000, James Rogers wrote:
>>>
>>>> This appears to be a problem with your version. The version 3.15P
>>>> has no problems with this code.
>>>> 
>>>> Jim Rogers
>>>
>>> Sorry, but it doesn't, this is the output of my installed 3.15p version
>>> which is the same as my 5.02w version:
>>>
>>> example.adb:228:19: ambiguous expression (cannot resolve "Translate")
>>                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>Translate is another st of overloaded functions with the same signature as
>Vertex;
>
>	procedure Translate(X, Y, Z : in GLdouble);
>	procedure Translate(X, Y, Z : in GLfloat);
>
>It's just that I've 3 Translate calls and about 40 Vertex calls in my test
>program.

This is only possible if you are using literals:

   Translate (1.0, 1.0, 1.0);  -- This is ambiguous

The compiler does not knwo which kind of Float you mean.

   Translate (GLfloat (1.0), 1.0, 1.0); -- This is OK

Now the compiler has a hint.

--
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de



  reply	other threads:[~2004-03-08 10:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-08  0:17 Overloading procedures with Float and Long_Float types Luke A. Guest
2004-03-08  3:49 ` James Rogers
2004-03-08  8:16   ` Luke A. Guest
2004-03-08  8:20     ` Preben Randhol
2004-03-08  9:06       ` Luke A. Guest
2004-03-08 10:10         ` Dmitry A. Kazakov [this message]
2004-03-08 14:05           ` Luke Guest
2004-03-08 14:07             ` Preben Randhol
2004-03-08 15:10               ` Luke Guest
2004-03-08 16:20                 ` Preben Randhol
2004-03-08 16:28                   ` Luke Guest
2004-03-08 17:58                     ` Preben Randhol
2004-03-09  8:55                       ` Dmitry A. Kazakov
2004-03-08 16:50                   ` Hyman Rosen
2004-03-08 16:55                     ` Luke Guest
2004-03-08 17:32                       ` Hyman Rosen
2004-03-08 14:37             ` Dmitry A. Kazakov
2004-03-08 15:18               ` Luke Guest
2004-03-08 19:52                 ` Gautier Write-only
2004-03-08 20:34                   ` Luke A. Guest
2004-03-09  8:40                 ` Dmitry A. Kazakov
2004-03-08 12:46 ` David C. Hoos
2004-03-08 14:03   ` Luke Guest
2004-03-08 14:54     ` Georg Bauhaus
2004-03-08 15:19       ` Luke Guest
2004-03-08 16:04     ` David C. Hoos
2004-03-08 16:17       ` Luke Guest
2004-03-09  9:24         ` Dmitry A. Kazakov
2004-03-08 19:58       ` Gautier Write-only
     [not found]     ` <1faf01c40527$0a364a10$b101a8c0@sy.com>
2004-03-08 16:21       ` Preben Randhol
replies disabled

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