From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: On naming space and the good use of qualified expression
Date: Fri, 19 Jan 2018 19:55:53 +0100
Date: 2018-01-19T19:55:53+01:00 [thread overview]
Message-ID: <p3tevq$oco$1@dont-email.me> (raw)
In-Reply-To: <310b1dea-459b-4a8b-b249-5bb63ea43512@googlegroups.com>
On 01/19/2018 06:51 PM, Mehdi Saada wrote:
> At that point of the program, I have three "/" operators visibles:
> function "/" (A: T_Rational, B: T_Rational) return T_Rational;
> function "/" (A: T_Integer, B: T_Integer) return T_Integer;
> function "/" (A: T_Integer, B: T_Integer) return T_Rational; -- my constructor method
> which makes this expression ambiguous:
> Result.Coef(Ind) := Poly_A.Coef(Ind+1) * (Ind+1)/1;
Note that this should be evaluated as
(Poly_A.Coef (Ind + 1) * (Ind + 1) ) / 1
and understanding it requires knowing what "*" operators are visible.
> Result.Coef(Ind) := Poly_A.Coef(Ind+1) * T_Rational'((Ind+1)/1);
This looks like it should work, but without a complete reproducer I can't tell
why it doesn't.
--
Jeff Carter
"Every sperm is sacred."
Monty Python's the Meaning of Life
55
next prev parent reply other threads:[~2018-01-19 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 17:51 On naming space and the good use of qualified expression Mehdi Saada
2018-01-19 18:37 ` Niklas Holsti
2018-01-19 18:38 ` AdaMagica
2018-01-19 18:55 ` Jeffrey R. Carter [this message]
2018-01-19 23:23 ` Mehdi Saada
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox