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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8d5151b6052512f7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-08 08:50:32 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!news3.optonline.net!newsfeed.kabelfoon.nl!195.129.110.21.MISMATCH!bnewsfeed00.bru.ops.eu.uu.net!bnewsinpeer00.bru.ops.eu.uu.net!emea.uu.net!ash.uu.net!spool.news.uu.net!not-for-mail Date: Mon, 08 Mar 2004 11:50:07 -0500 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Overloading procedures with Float and Long_Float types References: <404c7e53.0@entanet> <404c8da0.0@entanet> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1078764620.277793@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@aphelion.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1078764620 6796 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:6154 Date: 2004-03-08T11:50:07-05:00 List-Id: Preben Randhol wrote: > And the reason is? How does this work in C/C++ that doesn't even have types... Don't be silly. I think everyone here has concluded that the problematic case is where the function is being called with just literals. In Ada, literals are univeral reals, but in C/C++ a literal like 1.0 has type double. That means that in C++, overloading will disambiguate the call to refer to the GLdouble version (assuming that GLdouble is double).