comp.lang.ada
 help / color / mirror / Atom feed
From: AdaMagica <christ-usch.grein@t-online.de>
Subject: Re: compiler confusion, overloading and "subtype mark required in this context"
Date: Sun, 7 Feb 2021 02:59:46 -0800 (PST)	[thread overview]
Message-ID: <d4438f5b-9f09-41ab-8178-7265da42994fn@googlegroups.com> (raw)
In-Reply-To: <2241c895-8d4d-40fc-bf42-aa1c3daa0167n@googlegroups.com>

Without the full code, it's difficult to answer.

function "+" (R1: T_rational; R2: T_rational) return T_rational is
(if (denom(R1) = denom(R2)) then (ENUM(R1) + ENUM(r2))/ denom(R1)
else (DENOM(R2)*ENUM(R1) + denom(r1)*ENUM(r2))/DENOM(R1)*denom(R2)); 
If I count corretctly, looks like a closing ) is missing at the end. Thus in the else part, you have
Rational*Integer.

sign : T_SIGN := Positive;
Last: Positive; 
Here you have Positive as a type name and as an enumeration literal.

  reply	other threads:[~2021-02-07 10:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07  9:15 compiler confusion, overloading and "subtype mark required in this context" Mehdi Saada
2021-02-07 10:59 ` AdaMagica [this message]
2021-02-07 12:56   ` Mehdi Saada
2021-02-11  3:03     ` Randy Brukardt
replies disabled

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