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-Thread: 103376,9ec92fb9d5eb54fd,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!feeder.news.tin.it!spool.news.tin.it!not-for-mail From: Francesco Bochicchio Subject: redefinition of the operator Date: Sun, 20 Nov 2005 09:49:55 +0100 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table (Debian GNU/Linux)) Message-ID: Newsgroups: comp.lang.ada MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit Organization: TIN.IT (http://www.tin.it) X-Comments: Please send technical notifications to newsmaster@tin.it NNTP-Posting-Host: 87.3.254.120 X-Trace: 1132476557 reader1.news.tin.it 27604 87.3.254.120:32782 X-Complaints-To: Please send abuse reports to abuse@tin.it Xref: g2news1.google.com comp.lang.ada:6495 Date: 2005-11-20T09:49:55+01:00 List-Id: Hi all, I need to redefine the standard mathematic operators, to replace them with my own version. So, if I do something like this, it works: -- ****************************** procedure Test_MyOperators is A,B : Long_Float; function "+"(X, Y : Long_Float) return Long_Float is begin return X; end; begin A := 1.0; B := 2.0; if A = A+B then Put_Line("Yes."); else Put_Line("No"); end if; end; -- ------------------------------------- But since I have many packages, I want to put the redefined operators in a separate package, say MY_OPERATORS, and doing instead: -- ************************************* with MY_OPERATORS; use MY_OPERATORS; procedure Test_MyOperators is A,B : Long_Float; begin A := 1.0; B := 2.0; if A = A+B then Put_Line("Yes."); else Put_Line("No"); end if; end; -- ----------------------------------------------- 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? Thanks in advance. Ciao ------- FB