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=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a02:97da:: with SMTP id v26mr664952jaj.1.1542808204020; Wed, 21 Nov 2018 05:50:04 -0800 (PST) X-Received: by 2002:a9d:5ad:: with SMTP id 42mr117397otd.0.1542808203892; Wed, 21 Nov 2018 05:50:03 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!tncsrv06.tnetconsulting.net!weretis.net!feeder4.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!q69no250019itb.0!news-out.google.com!v141ni88ita.0!nntp.google.com!z5-v6no248484ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Nov 2018 05:50:03 -0800 (PST) In-Reply-To: <3e2acd57-a8c6-4e89-8d69-572cf4396aec@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2003:c7:83db:8dfd:9891:e604:4321:954f; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 2003:c7:83db:8dfd:9891:e604:4321:954f References: <3e2acd57-a8c6-4e89-8d69-572cf4396aec@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: overloading operators From: AdaMagica Injection-Date: Wed, 21 Nov 2018 13:50:04 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:54859 Date: 2018-11-21T05:50:03-08:00 List-Id: Am Mittwoch, 21. November 2018 10:56:09 UTC+1 schrieb hn...@yahoo.de: > How can I use the old and the overloaded operator at the same time in the= same program for the same type? > For example: Overloaded "*" defined by user for type Real_Matrix and "*"= defined in package Numerics.Real_Arrays for Real_Matrix. For the nomenclature: If I understand correctly what you're saying, it's not overloading, but ove= rriding what you're doing. If you defined a function "*" for type Real_Matrix in a package of your own= , say Pack, the corresponding operation in the package where Real_Matrix is= defined, here Ada.Numerics, is hidden from direct and use visibility in Pa= ck. You can make it visible again via an extended name. So which "*" is visible at certain place depends on the kind of visibility = of Pack and Ada.Numerics. With proper name qualification, both are callable= at the same place in code.