comp.lang.ada
 help / color / mirror / Atom feed
From: George J <ivanov_george@list.ru>
Subject: Re: Ada 2005,Doubly_Linked_List with Controlled parameter
Date: Tue, 5 Apr 2016 01:57:43 -0700 (PDT)
Date: 2016-04-05T01:57:43-07:00	[thread overview]
Message-ID: <7b646ee1-8a17-478e-a120-187357a99ba7@googlegroups.com> (raw)
In-Reply-To: <ndvu8i$ndc$1@gioia.aioe.org>

вторник, 5 апреля 2016 г., 11:50:31 UTC+3 пользователь Dmitry A. Kazakov написал:
> On 05/04/2016 10:35, George J wrote:
> > ....
> >> Or, better, since you never change Name or Surname:
> >>
> >>      type Info_Record
> >>         (Name_Length : Positive; Surname_Length : Positive) is
> >>      record
> >>         Name    : String (1..Name_Length);
> >>         Surname : String (1..Surname_Length);
> >>         Age     : Natural;
> >>      end Info_Record;
> >>
> >> --
> >> Regards,
> >> Dmitry A. Kazakov
> >> http://www.dmitry-kazakov.de
> >
> > I do it this way, and I have to change Doubly_Linked_List(Info_Record) to
> > Indefinite_DoublY_Linked(Info_Record) cause of error:"unconstrained
> > subtype in component declaration". Am I right?
> 
> I am not familiar with the design of standard container's doubly-linked 
> lists. Normally, a list always deals with limited indefinite elements. 
> Otherwise, it does not make much sense.
> 
> > Or may be it's any way to
> > use Doubly_Linked_List? And,BTW, I'm afraid of using Indefinite List
> > cause I think,that it can request much more memory, than
> > Doubly_C_L,isn't it?
> 
> As I said, I don't know how it is designed. There are many ways to 
> design a list. One is that elements are derived from linked base 
> elements. Another is that links are allocated outside and point to the 
> elements. A better variant of the latter is to use a custom storage pool 
> and put links before the elements. In all three methods there is no 
> overhead of having elements limited indefinite.
> 
> -- 
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de

It seems I've got.Thanks!

  reply	other threads:[~2016-04-05  8:57 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-05  2:03 Ada 2005,Doubly_Linked_List with Controlled parameter George J
2016-04-05  2:27 ` Jeffrey R. Carter
2016-04-05  3:00   ` George J
2016-04-05  4:13     ` George J
2016-04-05  6:20     ` Jeffrey R. Carter
2016-04-05  6:31       ` George J
2016-04-05  7:58     ` Dmitry A. Kazakov
2016-04-05  8:09       ` George J
2016-04-05  8:35       ` George J
2016-04-05  8:50         ` Dmitry A. Kazakov
2016-04-05  8:57           ` George J [this message]
2016-04-05 16:22         ` Jeffrey R. Carter
2016-04-06  1:14           ` George J
2016-04-05  3:25   ` George J
2016-04-05  5:24     ` Jeffrey R. Carter
2016-04-05  6:30       ` George J
2016-04-06 20:29         ` Randy Brukardt
2016-04-06 21:04           ` Jeffrey R. Carter
2016-04-07  1:28           ` George J
replies disabled

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