comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <jrcarter@acm.org>
Subject: Re: Ada.Containers.Doubly_Linked_Lists
Date: Sun, 04 Feb 2007 21:05:41 GMT
Date: 2007-02-04T21:05:41+00:00	[thread overview]
Message-ID: <FUrxh.255408$aJ.130566@attbi_s21> (raw)
In-Reply-To: <mailman.67.1170570920.18371.comp.lang.ada@ada-france.org>

Carroll, Andrew wrote:
>  
> I would like to understand how to use the 
> Ada.Containers.Doubly_Linked_Lists  package.  After I with 
> Ada.Containers.Doubly_Linked_Lists and then declare a variable x: 
> Ada.Containers.Doubly_Linked_Lists.List I get the error:
>  
> invalid prefix in selected component "doubly_linked_lists".

Ada.Containers.Doubly_Linked_Lists is not a package. It's a generic. A 
generic is like a template; you use it to create things (in this case, 
packages); this is called instantiation:

package P is new Ada.Containers.Doubly_Linked_Lists
    (Element_Type => Whatever, "=" => Some_Function);

Now P is a package, and may be used as any other package:

V : P.List;

-- 
Jeff Carter
"Now go away or I shall taunt you a second time."
Monty Python & the Holy Grail
07



  parent reply	other threads:[~2007-02-04 21:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.67.1170570920.18371.comp.lang.ada@ada-france.org>
2007-02-04  8:10 ` Ada.Containers.Doubly_Linked_Lists Niklas Holsti
2007-02-04 21:05 ` Jeffrey R. Carter [this message]
     [not found] <mailman.69.1170624131.18371.comp.lang.ada@ada-france.org>
2007-02-04 21:35 ` Ada.Containers.Doubly_Linked_Lists Niklas Holsti
2007-02-04 22:08   ` Ada.Containers.Doubly_Linked_Lists Ludovic Brenta
2007-02-05 15:43     ` Ada.Containers.Doubly_Linked_Lists Matthew Heaney
2007-02-05  4:03 ` Ada.Containers.Doubly_Linked_Lists Jeffrey R. Carter
2007-02-06 14:40 Ada.Containers.Doubly_Linked_Lists Carroll, Andrew
     [not found] <mailman.75.1170828524.18371.comp.lang.ada@ada-france.org>
2007-02-07  7:16 ` Ada.Containers.Doubly_Linked_Lists Niklas Holsti
2007-02-08 13:37 ` Ada.Containers.Doubly_Linked_Lists Stephen Leake
  -- strict thread matches above, loose matches on Subject: below --
2007-02-07 14:52 Ada.Containers.Doubly_Linked_Lists Carroll, Andrew
2007-02-07 15:06 ` Ada.Containers.Doubly_Linked_Lists Ludovic Brenta
2007-02-07 18:22   ` Ada.Containers.Doubly_Linked_Lists Jeffrey R. Carter
2007-02-08 13:39     ` Ada.Containers.Doubly_Linked_Lists Stephen Leake
2007-02-07 18:19 ` Ada.Containers.Doubly_Linked_Lists Jeffrey R. Carter
2007-02-08 10:44   ` Ada.Containers.Doubly_Linked_Lists Alex R. Mosteo
replies disabled

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