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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,379f9c2a66a5ddc8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Question about package Interfaces. Date: Tue, 14 Sep 2010 08:33:14 +0200 Organization: Adalog Message-ID: References: <4c8d7a8e$0$2408$4d3efbfe@news.sover.net> <4c8e2be0$0$2414$4d3efbfe@news.sover.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 14 Sep 2010 06:33:26 +0000 (UTC) Injection-Info: mx03.eternal-september.org; posting-host="R6XkmKDe5FVL0VlxQ170Ew"; logging-data="329"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wiNnJNElXZ4pS23D/HDBR" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 In-Reply-To: <4c8e2be0$0$2414$4d3efbfe@news.sover.net> Cancel-Lock: sha1:KN42xZZIUlF9GsMIgq6xbFegmRc= Xref: g2news1.google.com comp.lang.ada:14067 Date: 2010-09-14T08:33:14+02:00 List-Id: Le 13/09/2010 15:47, Peter C. Chapin a �crit : > On 2010-09-12 23:54, Robert A Duff wrote: > >> Unsigned_8'Size = 8. But that does not mean that all objects >> of subtype Unsigned_8 are 8 bits, nor that X'Size = 8 >> (where "X: Unsigned_8;"). For example, an object could >> be stored in a 64-bit register. >> >> A packed array A of Unsigned_8 will have A'Component_Size = 8, >> and A(I)'Size = 8 for all I. > > So I have to explicitly ask for a packed array in order to get this > guarantee? I don't know exactly what you want to achieve, but bear in mind that talking about the size of a single variable is meaningless. Imagine that you declared: X : Unsigned_8; and you discover that the declaration advances the data counter by 4 bytes. You can interpret that as X occupying 32 bits, or as X occupying only 8 bits with 3 unused padding bytes ahead of it. There is positively no way to tell the difference. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr