comp.lang.ada
 help / color / mirror / Atom feed
From: hnptz@yahoo.de
Subject: Re: overloading operators
Date: Wed, 21 Nov 2018 08:39:58 -0800 (PST)
Date: 2018-11-21T08:39:58-08:00	[thread overview]
Message-ID: <cfb28c8d-10ce-4397-b89b-63a1a8bb98bc@googlegroups.com> (raw)
In-Reply-To: <fd28a26b-2271-4df0-978c-e24c9dc8b066@googlegroups.com>

On Wednesday, November 21, 2018 at 2:50:05 PM UTC+1, AdaMagica wrote:
> 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 overriding 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 Pack. 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.


what would be a proper name qualification? Extended name for pack defined "*" in Ada.Numerics like pack."*"?

  parent reply	other threads:[~2018-11-21 16:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21  9:56 overloading operators hnptz
2018-11-21 11:28 ` Jeffrey R. Carter
2018-11-21 13:50 ` AdaMagica
2018-11-21 13:52   ` AdaMagica
2018-11-21 16:39   ` hnptz [this message]
2018-11-21 17:37     ` Simon Wright
2018-11-22  8:18       ` briot.emmanuel
2018-11-22 11:39         ` Simon Wright
2018-11-26 17:47         ` Anh Vo
2018-11-26 18:03           ` Simon Wright
2018-11-26 18:24             ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox