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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Ada 2005,Doubly_Linked_List with Controlled parameter Date: Tue, 5 Apr 2016 09:22:42 -0700 Organization: A noiseless patient Spider Message-ID: References: <1083384c-e798-49a0-903a-718dea4ab131@googlegroups.com> <8fdba7bf-86a5-4d6e-b212-c670d3fdf9f9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 5 Apr 2016 16:19:31 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="48b46be33beed75863f69afa437f956b"; logging-data="12227"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CzMG2yxrXp+RxYAKe92GglqTwCClwAqU=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: <8fdba7bf-86a5-4d6e-b212-c670d3fdf9f9@googlegroups.com> Cancel-Lock: sha1:3ocPQ2Epn319BEEo92mz0CGl4gY= Xref: news.eternal-september.org comp.lang.ada:29998 Date: 2016-04-05T09:22:42-07:00 List-Id: On 04/05/2016 01:35 AM, George J wrote: > ... >> 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; > > 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? 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? Yes, you'd have to use the indefinite version for such a type, but it's nothing to worry about. -- Jeff Carter "Nobody expects the Spanish Inquisition!" Monty Python's Flying Circus 22