From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.159.39.8 with SMTP id a8mr17073740uaa.6.1459846663990; Tue, 05 Apr 2016 01:57:43 -0700 (PDT) X-Received: by 10.182.243.225 with SMTP id xb1mr370950obc.2.1459846663936; Tue, 05 Apr 2016 01:57:43 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!10no486119qgg.1!news-out.google.com!ha2ni112igb.0!nntp.google.com!nt3no7909054igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 5 Apr 2016 01:57:43 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=95.173.128.204; posting-account=YB4WOgoAAABLG9D7qoJiPBc6EJSzsPDF NNTP-Posting-Host: 95.173.128.204 References: <1083384c-e798-49a0-903a-718dea4ab131@googlegroups.com> <8fdba7bf-86a5-4d6e-b212-c670d3fdf9f9@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7b646ee1-8a17-478e-a120-187357a99ba7@googlegroups.com> Subject: Re: Ada 2005,Doubly_Linked_List with Controlled parameter From: George J Injection-Date: Tue, 05 Apr 2016 08:57:43 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:29988 Date: 2016-04-05T01:57:43-07:00 List-Id: =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, 5 =D0=B0=D0=BF=D1=80=D0=B5=D0= =BB=D1=8F 2016 =D0=B3., 11:50:31 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE= =D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Dmitry A. Kazakov =D0=BD=D0=B0=D0=BF= =D0=B8=D1=81=D0=B0=D0=BB: > 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? >=20 > I am not familiar with the design of standard container's doubly-linked= =20 > lists. Normally, a list always deals with limited indefinite elements.=20 > Otherwise, it does not make much sense. >=20 > > 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? >=20 > As I said, I don't know how it is designed. There are many ways to=20 > design a list. One is that elements are derived from linked base=20 > elements. Another is that links are allocated outside and point to the=20 > elements. A better variant of the latter is to use a custom storage pool= =20 > and put links before the elements. In all three methods there is no=20 > overhead of having elements limited indefinite. >=20 > --=20 > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de It seems I've got.Thanks!