comp.lang.ada
 help / color / mirror / Atom feed
From: "Warren W. Gay VE3WWG" <ve3wwg@NoSpam.cogeco.ca>
Subject: Re: APQ
Date: Thu, 16 Dec 2004 23:03:48 -0500
Date: 2004-12-16T23:03:48-05:00	[thread overview]
Message-ID: <GTswd.248$Wt5.145533@read2.cgocable.net> (raw)
In-Reply-To: <sa4d5x9si42.fsf@snoopy.apana.org.au>

Brian May wrote:
>>>>>>"Randy" == Randy Brukardt <randy@rrsoftware.com> writes:
>     Randy> I haven't looked at the code in question, but it certainly
>     Randy> is possible to have concrete operations and components on
>     Randy> an abstract type (the type has be abstract - if it is
>     Randy> tagged - to have abstract subprograms). We do it all the
>     Randy> time in Claw and its related programs. That's the big
>     Randy> difference between an abstract type and an Ada 2005
>     Randy> interface (which can't have any data or concrete
>     Randy> subprograms).
> 
> I tried to get it working, but couldn't:
> ...
>    type Root_Connection_Type is abstract new Ada.Finalization.Limited_Controlled with private;
> ...
>    procedure Connect(C : in out Root_Connection_Type) is abstract;
>    procedure Connect(C : in out Root_Connection_Type; Same_As : Root_Connection_Type'Class) is abstract;
> ...
> gcc-3.4 -c -gnata -gnatf -gnato -gnatwp -O0 comp_mysql.adb
> apq.ads:126:14: abstract subprogram not allowed for type "Root_Connection_Type"
> apq.ads:127:14: abstract subprogram not allowed for type "Root_Connection_Type"
> apq.ads:584:09: nonabstract type has abstract subprogram "Connect"
> gnatmake: "comp_mysql.adb" compilation error
> make: *** [mysql1] Error 4
> 
> What did I do wrong? How do I create a abstract type that is derived
> from Ada.Finalization.Limited_Controlled?

The error looks familiar, though I don't understand the reason
for the "limitation" that the compiler is imposing.

Warren.



  reply	other threads:[~2004-12-17  4:03 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15 23:31 APQ Brian May
2004-12-16 11:34 ` APQ Warren W. Gay VE3WWG
2004-12-16 23:58   ` APQ Randy Brukardt
2004-12-17  3:45     ` APQ Brian May
2004-12-17  4:03       ` Warren W. Gay VE3WWG [this message]
2004-12-17  4:38         ` APQ Brian May
2004-12-17  9:06           ` APQ Egil H. H�vik
2004-12-17 11:42             ` APQ Brian May
2004-12-17 22:55               ` APQ Brian May
2004-12-18 15:52                 ` APQ Warren W. Gay VE3WWG
2004-12-18 18:23                   ` APQ Dmitry A. Kazakov
2004-12-21 23:34                     ` APQ Brian May
2004-12-22  8:57                       ` APQ Dmitry A. Kazakov
2004-12-22 10:07                   ` APQ Martin Krischik
2004-12-22 13:15                     ` APQ Dmitry A. Kazakov
2004-12-22 16:53                       ` APQ Martin Krischik
2004-12-22 17:21                         ` APQ Dmitry A. Kazakov
2004-12-22 18:23                           ` APQ Martin Krischik
2004-12-17  8:59       ` APQ Stephen Leake
2004-12-17 14:12       ` APQ Dmitry A. Kazakov
2004-12-17 23:20         ` APQ Brian May
2004-12-18 16:13           ` APQ Dmitry A. Kazakov
2004-12-21 23:29         ` APQ Brian May
2004-12-22  9:14           ` APQ Dmitry A. Kazakov
2005-01-04 21:32             ` APQ Brian May
2005-01-05 11:58               ` APQ Dmitry A. Kazakov
2004-12-23 17:04           ` APQ (Connection Cloning) Warren W. Gay VE3WWG
2004-12-23 17:55             ` Georg Bauhaus
2004-12-23 18:52               ` Warren W. Gay VE3WWG
2005-01-03  7:40                 ` Frank Piron
2004-12-17 13:54 ` APQ Dmitry A. Kazakov
  -- strict thread matches above, loose matches on Subject: below --
2004-12-16  4:37 APQ Christoph Karl Walter Grein
replies disabled

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