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,dab1e23fc81e6b17 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-01 13:51:17 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: overriding "*", was Re: What's the ICFP Programming contest? Date: Tue, 1 Jul 2003 15:52:46 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:39964 Date: 2003-07-01T15:52:46-05:00 List-Id: tmoran@acm.org wrote in message ... >For the contest I needed to override normal fixed point multiply and >divide, so I declared > type Root_Numbers is delta ... > type Numbers is new Root_Numbers; > function "*"(Left, Right : Numbers) return Numbers; > A, B, C : Numbers; >and tried to use it in formulas like > C := Numbers(A * B); >But a compiler said the "*" was ambiguous between my function and Standard. >It seems to me I overrode, and thus hid, Standard."*", no? > p.s. I did manage to write a program that successfully drove the first 5 >out of 9 race tracks. It gets really lost though in the maze-like ones. >The "programming" contest really becomes an "algorithm" contest there. That's a well-known feature of Ada 95 (and it is incompatible with Ada 83). The problem is that you can't hide the mixed fixed point multiply (any fixed * any fixed -> universal fixed), so it is ambiguous anywhere other than in the children of your fixed point package. The ARG has looked at this problem several times, and so far it has defied solution. Tucker announced that he had solved it when I was talking to him after the Toulouse meeting, but whether that is really true (and whether we can live with the incompatibility) is yet to be seen. Randy.