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 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:55:09 PST From: "Luke Guest" Newsgroups: comp.lang.ada References: <404c7e53.0@entanet> <404c8da0.0@entanet> <1078764620.277793@master.nyc.kbcfp.com> Subject: Re: Overloading procedures with Float and Long_Float types Date: Mon, 8 Mar 2004 16:55:06 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 195.74.122.227 Message-ID: <404ca56c.0@entanet> X-Trace: 8 Mar 2004 16:55:08 GMT, 195.74.122.227 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!newspeer1.nwr.nac.net!solnet.ch!solnet.ch!81.31.101.51.MISMATCH!entanet!195.74.122.227 Xref: archiver1.google.com comp.lang.ada:6155 Date: 2004-03-08T16:55:06+00:00 List-Id: "Hyman Rosen" wrote in message news:1078764620.277793@master.nyc.kbcfp.com... > 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 Hmmm, I thought that it had type float and double when 1.0lf? I *always* use 1.0f or 1.0lf depending on my needs anyway. > to refer to the GLdouble version (assuming that GLdouble is double). It is. Also, the GL types would probably have to be changed to Ada types anyway to make it easier (read "more Ada like") to use ;-) Luke.