comp.lang.ada
 help / color / mirror / Atom feed
From: Laurent <daemon2@internet.lu>
Subject: Re: Problem implementing Iterators
Date: Tue, 27 Jan 2015 10:06:42 -0800 (PST)
Date: 2015-01-27T10:06:42-08:00	[thread overview]
Message-ID: <016b982c-d376-4db4-bb7c-37561e7903d2@googlegroups.com> (raw)
In-Reply-To: <ma8jee$1ci$1@dont-email.me>


> change
> L1 : GL_String.List ;
> to
> L1 : aliased GL_String.List ;

Ok thanks works now. An easier solution than what I tried. Was writing the message while you posted yours :)

>Think (/= knowing) I have found the beginning of the solution
>
>   type Element_Type is private;
>   type Element_Ptr is access all Element_Type;
>   with procedure Display_Element (Item : in Element_Type);
>
>(...)
>
>private
>
>   type List_Node;
>   type List_Ptr is access List_Node;
>   type List_Node is record
>      Element : aliased Element_Ptr;
>      Next    : List_Ptr;
>      Previous:List_Ptr;
>   end record;
>
>the only problem I have now is that when I want to instantiate the package I get:
>
>23:4 missing actual "Element_Ptr"?
>
>When I changed Element_Type to Element_Ptr I got the message that Element_Type is missing? >Or do I have to provide both?

Would that actually have worked? Perhaps the additional Element_Ptr was't needed at all?

Thanks


  reply	other threads:[~2015-01-27 18:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27 13:54 Problem implementing Iterators Laurent
2015-01-27 16:24 ` AdaMagica
2015-01-27 17:26   ` Laurent
2015-01-27 17:55     ` Björn Lundin
2015-01-27 18:06       ` Laurent [this message]
2015-01-27 18:43         ` Björn Lundin
2015-01-27 20:58           ` Jeffrey Carter
2015-01-28 12:20             ` Björn Lundin
2015-01-28 16:42     ` AdaMagica
2015-01-28 20:14       ` Laurent
replies disabled

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