Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: using an Ad...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 9 Topic 5639 of 5831
Post > Topic >>

Re: using an Ada.Container as a private type

by Robert A Duff <bobduff@[EMAIL PROTECTED] > Apr 3, 2008 at 12:00 PM

Graham <graham.stark@[EMAIL PROTECTED]
> writes:

>    type Payment_Stream is new Payment_Stream_Package.Map;
>
> but I can't do this. Gnat complains that "type derived from tagged
> type must have extension".
> I'm fairly new to Ada but thought I was getting on top of it! What is
> the principal that stops me doing this? What should I do instead?

Not really a "principle" -- more like an arbitrary restriction.
Map is tagged, and tagged types have to obey that rule.

You should say:

    type Payment_Stream is new Payment_Stream_Package.Map
        with null record;

to create an empty extension.

- Bob
 




 9 Posts in Topic:
using an Ada.Container as a private type
Graham <graham.stark@[  2008-04-03 08:29:28 
Re: using an Ada.Container as a private type
Robert A Duff <bobduff  2008-04-03 12:00:24 
Re: using an Ada.Container as a private type
"Dmitry A. Kazakov&q  2008-04-03 18:02:48 
Re: using an Ada.Container as a private type
Graham <graham.stark@[  2008-04-03 09:20:40 
Re: using an Ada.Container as a private type
Maciej Sobczak <see.my  2008-04-03 13:41:10 
Re: using an Ada.Container as a private type
Graham <graham.stark@[  2008-04-04 01:02:30 
Re: using an Ada.Container as a private type
Robert A Duff <bobduff  2008-04-04 13:25:35 
Re: using an Ada.Container as a private type
Simon Wright <simon.j.  2008-04-04 20:37:38 
Re: using an Ada.Container as a private type
Adam Beneschan <adam@[  2008-04-04 08:57:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 20:43:50 CDT 2008.