From: jankok@mcvax.uucp (Jan Kok)
Subject: Re: The equals function.
Date: Tue, 30-Sep-86 05:31:18 EDT [thread overview]
Date: Tue Sep 30 05:31:18 1986
Message-ID: <310@zuring.mcvax.UUCP> (raw)
In-Reply-To: 8609252153.AA03089@ucbvax.Berkeley.EDU
In article <8609252153.AA03089@ucbvax.Berkeley.EDU> RRACINE@ADA20.ISI.EDU (Roger Racine) writes:
>The problem, according to Pat Rogers is:
My summary: declaring an "=" operator for a limited private type which
is actually 'access INTEGER' leads to a recursive call of this "=".
Roger answers correctly:
> all that was needed was:
>
> if STANDARD."="(LEFT, null) then
>
My summary: qualify the operator (in prefix notation) instead of try to
help the overloading resolution algorithm by qualifying the
operands.
I ignore other helpful answers which avoid the interesting problem, like:
Introduce a hidden type for the 'access INTEGER' type.
But then Roger adds:
>Unfortunately, the equality operator is not found in package STANDARD!
He quotes App. C and section 8.6 of the ARM to support this, and ends with
>I checked with two validated compilers, and both rejected the STANDARD."="
>approach.
That's the interesting part (to me).
I checked with a validated compiler (wellll, expired now), and it
recognizes STANDARD."=".
So the match is still open, but the problem should not be settled
by a democratic check on all validated compilers of course.
I tend to accept what the compiler I can use does, and my attempt of an
explanation is:
1. According to ARM 4.5.2, "=" is predefined.
2. App. C does not contain, and does not pretend to contain all
specifications of predefined operators. It contains a lot of comments.
The package STANDARD in App C contains, as it says it should:
the type declarations for the predefined types, together with
some subtypes and packages.
It says that the predefined operators are IMPLICIT. This applies
to operators for 'any type' like "=" as well as those for the predefined
types.
3. The missing link is:
Where does the manual say that STANDARD is the appropriate prefix
for the full name of the implicit operators.
I would say: if Roger's two validated compilers accept STANDARD."+",
they should accept STANDARD."=" as a matter of consequence.
next prev parent reply other threads:[~1986-09-30 9:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1986-09-25 14:24 The equals function Roger Racine
1986-09-30 9:31 ` Jan Kok [this message]
1986-09-30 14:22 ` Jan Kok
-- strict thread matches above, loose matches on Subject: below --
1986-09-29 17:43 BBardin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox