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,9ec92fb9d5eb54fd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!sumatra.thomas-huehn.de!texta.sil.at!newsfeed.utanet.at!newsfeed.inode.at!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: redefinition of the operator Date: Sun, 20 Nov 2005 12:12:00 +0100 Organization: Cablecom Newsserver Message-ID: <8399001.SXf9EOrb0V@linux1.krischik.com> References: NNTP-Posting-Host: 84-73-3-231.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1132487103 22342 84.73.3.231 (20 Nov 2005 11:45:03 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Sun, 20 Nov 2005 11:45:03 +0000 (UTC) User-Agent: KNode/0.9.2 Xref: g2news1.google.com comp.lang.ada:6500 Date: 2005-11-20T12:12:00+01:00 List-Id: Francesco Bochicchio wrote: > But this does not work.The function Test_MyOperators > keep using the standard "+" instead of the redefined one > exported by MY_OPERATORS. > > Anybody knows how to do this? Well, interesting. And No, I don't know the reason - the language lawyers will tell you soon. However from a practical point of view: You should not define your own operators unless you also define your own type as well. So consider : type My_Float is Long_Float; function "+"(X, Y : My_Float) return My_Float; and then a use type MY_OPERATORS.My_Type; And writing package name all upper case is out of fashion for at least 10 years. Actually: Writing anything all upper case in Ada is out of fashion since the introduction of Ada 95. You can do it if you like but it is realy un-cool ;-) . Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com