comp.lang.ada
 help / color / mirror / Atom feed
From: "G.B." <bauhaus@notmyhomepage.invalid>
Subject: Re: overloading predefined operators
Date: Sat, 25 Jun 2022 08:21:33 +0200	[thread overview]
Message-ID: <t969hd$3eg$1@dont-email.me> (raw)
In-Reply-To: <eb55c39b-0d83-4c2a-be0a-0b62d30864c3n@googlegroups.com>

On 25.06.22 07:58, L. B. wrote:
> Randy,
> 
>> I generally prefer to use prefix notation in such cases rather than renaming
>> (which is easy to get subtly wrong). Remember that you can call any Ada
>> operator as if it is a normal function. So:
>>
>> if Standard."=" (A, B) then
> 
> I tried this in
> https://github.com/Blunk-electronic/ada_training/blob/master/src/redefining/equality_1/equality.adb
> see line 99.
> 
> The compiler says:
> equality.adb:99:20: incompatible arguments for operator

That's the compiler telling you that TYPE_FLOAT is not
type Float, the type of arguments needed for Standard."="
(see above).

See Jeffrey Carter's response for what to do to make them
that.

  reply	other threads:[~2022-06-25  6:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1fabca7a-e3f0-41bb-9b51-9eabde85e800n@googlegroups.com>
2022-06-24  8:23 ` overloading predefined operators Dmitry A. Kazakov
2022-06-24  9:44   ` L. B.
2022-06-25  3:18   ` Randy Brukardt
2022-06-25  5:58     ` L. B.
2022-06-25  6:21       ` G.B. [this message]
2022-06-24 10:47 ` Jeffrey R.Carter
replies disabled

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