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-Thread: 103376,fc52c633190162e0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Erasing inappropriate operations Date: Wed, 4 Apr 2007 17:00:11 -0500 Organization: Jacob's private Usenet server Message-ID: References: <1172144043.746296.44680@m58g2000cwm.googlegroups.com><1172161751.573558.24140@h3g2000cwc.googlegroups.com><546qkhF1tr7dtU1@mid.individual.net><5ZULh.48$YL5.40@newssvr29.news.prodigy.net><1175215906.645110.217810@e65g2000hsc.googlegroups.com><1175230700.925143.28490@n59g2000hsh.googlegroups.com><1btkgzzj6zimp.acsq8mkzqz1w$.dlg@40tude.net><1175488143.324741.283480@y80g2000hsf.googlegroups.com><1lxqyx4ognsed$.ait5qqwujfo8$.dlg@40tude.net><1175501959.751535.23190@d57g2000hsg.googlegroups.com><1175604129.583861.40720@q75g2000hsh.googlegroups.com> <87vegcfsh1.fsf@ludovic-brenta.org> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1175723922 27075 69.95.181.76 (4 Apr 2007 21:58:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 4 Apr 2007 21:58:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Xref: g2news1.google.com comp.lang.ada:14786 Date: 2007-04-04T17:00:11-05:00 List-Id: "Ludovic Brenta" wrote in message news:87vegcfsh1.fsf@ludovic-brenta.org... > Randy Brukardt writes: ... > The abstract subprogram is indeed considered in overload resolution. > But since the resolution fails (the call is ambiguous), there is still > no way to call the abstract subprogram. So if I understand correctly, > in Amendment 1, the call is no longer ambiguous and the first operator > is called. Correct? Correct. It's not legal to call the abstract subprogram, but because it is considered in expression resolution, the mere fact that it exists can make some expressions that otherwise be legal illegal. That is a significant problem for unit types, because you generally don't want the predefined multiply and divide routines (that is meters * meters = meters is wrong). I think you are correct that my example was wrong; I wrote it bunch of times and kept finding problems (and didn't want to waste all afternoon trying to figure it out). I think I meant: B : F1 := A * 1.0; No, that isn't right either. Anyway, I wanted an example without a type conversion (because if you're trying to do units checking, you're not going to be converting seconds to meters). They're certainly possible, I just had trouble coming up with an example. Randy.