From: "Grein, Christoph" <christoph.grein@eurocopter.com>
Subject: Re: Invoking abstract subprograms in Ada95
Date: Wed, 24 Apr 2002 09:32:42 +0200 (MET DST)
Date: 2002-04-24T09:32:42+02:00 [thread overview]
Message-ID: <mailman.1019634482.20993.comp.lang.ada@ada.eu.org> (raw)
> "Grein, Christoph" <christoph.grein@eurocopter.com> wrote in message
news:<mailman.1019483282.562.comp.lang.ada@ada.eu.org>...
>
> > Class-wide operations cannot be abstract, they also cannot be overrridden.
> >
> > OK, they can be abstract, this is why your code compiles, but abstractness
here
> > has a devastating meaning: There can never be such an operation!
>
>
> Aha. Now I see the error of my ways.
>
> >
> >
> > > end abstract_bit;
> > >
> > > --
> > > package body abstract_bit is
> > >
> > > procedure generalOperation( this : in out A'class ) is
> > > begin
> > > specificOperation( this => this );
> >
> > You said it was abstract, so does not exist! Therefore you cannot call it
here.
>
> Weeell in my mind, for generalOperation to be invoked, 'A' must have
> been extended sufficiently to be non abstract, and therefore an
> implementation of specificOperation *must* exist ;)
No, it can't exist because you defined it class-wide and abstract. It can only
exist if you defined it class-specific and abstract. This is what my previous
code example showed.
next reply other threads:[~2002-04-24 7:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-24 7:32 Grein, Christoph [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-22 13:44 Invoking abstract subprograms in Ada95 Grein, Christoph
2002-04-23 8:36 ` Mike
2002-04-22 4:28 Grein, Christoph
2002-04-22 13:24 ` Mike
2002-04-22 14:24 ` Dmitry A. Kazakov
2002-04-19 13:15 Mike
2002-04-19 16:18 ` 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