comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: how to import a package
Date: Tue, 12 Dec 2006 03:31:06 GMT
Date: 2006-12-12T03:31:06+00:00	[thread overview]
Message-ID: <_npfh.267674$FQ1.161060@attbi_s71> (raw)
In-Reply-To: <1165893584.829025.235440@l12g2000cwl.googlegroups.com>

markww wrote:
> 
>     generic
>         type T is private;
>     package Generic_List is
>       ...
>       -- Something like:
>       m_Start : Node_Ptr;
>       m_Last : Node_Ptr;
> 
>    end Generic_List;


You can do that, but then your package can only be a single list. If 
that's what you want, you should consider moving the type and data 
declarations to the body, and only having the operations in the spec. 
Perhaps what you really want is something like

type List is record
    First : Node_Ptr;
    Last  : Node_Ptr;
end record;

procedure Add (To : in out List; Item : in T);

-- 
Jeff Carter
"Blessed is just about anyone with a vested interest in the status quo."
Monty Python's Life of Brian
73



  reply	other threads:[~2006-12-12  3:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06  2:14 how to import a package markww
2006-12-06  3:06 ` Adam Beneschan
2006-12-06  3:34   ` markww
2006-12-06  9:18     ` Simon Wright
2006-12-06 19:47 ` Jeffrey R. Carter
2006-12-06 23:56   ` markww
2006-12-07  1:18     ` Björn Persson
2006-12-07  1:26     ` Brian May
2006-12-07  4:14       ` markww
2006-12-07  4:40         ` Brian May
2006-12-07  9:32           ` Stuart
2006-12-07 11:21             ` Jean-Pierre Rosen
2006-12-11  6:16               ` markww
2006-12-11  6:50                 ` markww
2006-12-11  9:40                   ` Georg Bauhaus
2006-12-11 14:19                     ` markww
2006-12-11 15:03                       ` Dmitry A. Kazakov
2006-12-11 16:22                       ` Adam Beneschan
2006-12-11 20:28                       ` Jeffrey R. Carter
2006-12-12  3:19                         ` markww
2006-12-12  3:31                           ` Jeffrey R. Carter [this message]
2006-12-12  9:03                           ` Stuart
2006-12-12 10:56                           ` Georg Bauhaus
2006-12-11  7:00                 ` Simon Wright
2006-12-07  4:06     ` Jeffrey R. Carter
replies disabled

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