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-7-bit Path: g2news1.google.com!news1.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Question about package Interfaces. Date: Mon, 13 Sep 2010 10:15:52 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <4c8d7a8e$0$2408$4d3efbfe@news.sover.net> <4c8e2be0$0$2414$4d3efbfe@news.sover.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1284387339 1136 192.74.137.71 (13 Sep 2010 14:15:38 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Mon, 13 Sep 2010 14:15:38 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:8Fdf7vhMdkLiYCpZghCGmd3SYSc= Xref: g2news1.google.com comp.lang.ada:14042 Date: 2010-09-13T10:15:52-04:00 List-Id: "Peter C. Chapin" writes: >> 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? Is that true even if I declare a component type with an > explicit representation clause requesting an 8 bit size? I guess probably. You can say "for A'Component_Size use 8;". For records, you can specify the size of each component. For standalone objects, you can specify 'Size. But my point was just that the 'Size of an object is not guaranteed to be the same as the 'Size of its subtype. You might want to look into the GNAT-specific 'Object_Size attribute. - Bob