comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@classwide.com>
Subject: Re: Tagged types (beginner's question) !
Date: Fri, 30 Aug 2002 14:31:45 GMT
Date: 2002-08-30T14:31:45+00:00	[thread overview]
Message-ID: <llLb9.3803$mB5.1039567026@newssvr12.news.prodigy.com> (raw)
In-Reply-To: akkq54$kcq$1@clnews.edf.fr

> First Question :
>     Can I override the primitive operation "Adjust" of the
controlled
> type with the following :
>         procedure Adjust (F : in out Fraction'Class);
>     instead of :
>         procedure Adjust( F : in out Fraction);

No.  That would be a different procedure and not an overriding.

> Second question :
>     How can Adjust (F : in out Fraction'Class) return an object of
type
> Entier instead of Fraction ?
>     I tried something like
>         F := E; --(with E : Entier)
>     and many other more complicated things but I always have the
same
> error message from GNAT :
>         "Dynamiclly tagged expression required".

Better deal with the problem above first.





  parent reply	other threads:[~2002-08-30 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-29  9:39 Tagged types (beginner's question) ! Vincent DIEMUNSCH
2002-08-30 13:35 ` Ted Dennison
2002-08-30 14:31 ` Pat Rogers [this message]
2002-08-30 16:04 ` Stephen Leake
replies disabled

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