From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: specifying only 'First of an index in an array Date: Wed, 3 Feb 2021 20:29:44 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <81d3d242-1bb8-48fb-8bd4-f236447c0a00n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 3 Feb 2021 19:29:46 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="53faf41c179b2ddd73a0ddf721e8ecee"; logging-data="17699"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186UAhZS25pkuTfNPWuH2zqs94HD1zp6G4=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 Cancel-Lock: sha1:+AB+ZRUq1Gm3qN7IMkwiLmwPUdw= In-Reply-To: <81d3d242-1bb8-48fb-8bd4-f236447c0a00n@googlegroups.com> Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:61273 List-Id: On 2/3/21 6:47 PM, Mehdi Saada wrote: > Is there a way, on nominal or genetic array type definition (I mean in generic specifications), to ensure that Index_type'First is always the same, but that arrays can still grow ? Arrays can't grow in Ada, so I don't know what you're asking. For a sequence with a fixed lower bound and variable length you can use Ada.Containers.Vectors. -- Jeff Carter "Sheriff murdered, crops burned, stores looted, people stampeded, and cattle raped." Blazing Saddles 35