From: Ted Dennison<dennison@telepath.com>
Subject: Re: Should the compiler accept this?
Date: Wed, 10 Oct 2001 17:11:25 GMT
Date: 2001-10-10T17:11:25+00:00 [thread overview]
Message-ID: <1j%w7.23291$ev2.31932@www.newsranger.com> (raw)
In-Reply-To: 9q1uah$6ir$1@trog.dera.gov.uk
In article <9q1uah$6ir$1@trog.dera.gov.uk>, Stephen Cole says...
>The compiler is not complaining about it, but according to the rules of Ada
>and not just what the compiler accepts, should I be defining a function
>Hello() for derived type MyNewRcd2?? Or can I always assume that the Hello()
>defined for type MyNewRcd will actually catch calls to Hello() made with an
>actual MyNewRcd2 type variable passed as a parameter to Add()?
The only time you *have* to define an overriding subprogram is when the parent's
version of the subprogram was abstract. Otherwise, you can just let it dispatch
to the parent's subprogram (which it will do).
---
T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html
No trees were killed in the sending of this message.
However a large number of electrons were terribly inconvenienced.
next prev parent reply other threads:[~2001-10-10 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-10 16:57 Should the compiler accept this? Stephen Cole
2001-10-10 17:11 ` Ted Dennison [this message]
2001-10-10 17:12 ` Ed Falis
2001-10-11 8:48 ` Stephen Cole
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox