From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Ada array contiguity. Date: Sun, 19 Feb 2023 15:28:23 +0100 Organization: Adalog Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 19 Feb 2023 14:28:22 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="2a2a8bfd02c78e11aee82bc56aeb068e"; logging-data="451530"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19l36ZldQsLemFDLoQrZJaH" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Cancel-Lock: sha1:CBPkKnYvUCceB4NW6Z88a2GXezE= In-Reply-To: Content-Language: en-US, fr Xref: reader01.eternal-september.org comp.lang.ada:64941 List-Id: Le 19/02/2023 à 14:34, Rod Kay a écrit : > Hi all, > >    I've been told that Ada array elements are not guaranteed to be > contiguous unless the 'Convention C' aspect is applied. > >    Is this correct ? The strength of Ada is that it protects you from all implementation details, thus allowing compilers to choose the most efficient implementation. Therefore, the answer is yes. (BTW: try to find a definition of "contiguous". At byte level? At word level? What if the element does not fill a byte?) -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX https://www.adalog.fr https://www.adacontrol.fr