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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,72340e997bfd5289 X-Google-Attributes: gid103376,public From: "DuckE" Subject: Re: array size Date: 1999/12/11 Message-ID: <3852831a.0@news.pacifier.com>#1/1 X-Deja-AN: 559410240 References: <101219991605504828%hopperj@macconnect.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Trace: 11 Dec 1999 09:00:10 PST, 216.65.140.225 X-MSMail-Priority: Normal Reply-To: "DuckE" Newsgroups: comp.lang.ada Date: 1999-12-11T00:00:00+00:00 List-Id: Here's my results with GNAT 3.12p on Windows NT: ----------------- Size of Frequency Type = 24 Length of Preset_Array_Type = 6 Size of Preset array elems (Frequency_Type) * length of array = 144 Size of Preset_Array_Type (per compiler- should match above calculation = 144 Length of Day_Array_Type = 7 Size of day array elems (Preset_Array _Type) * length of array = 1008 Size of Day_Array_Type (per compiler- should match above calculation = 1008 ------------------ It looks like this is what you were expecting. What's your host/target? SteveD James E. Hopper wrote in message news:101219991605504828%hopperj@macconnect.com... > the following program is a cut and paste from some code we are porting > to gnat from vads. if some reason the type > > type Day_Array_Type is array ( Day_Type ) of Preset_Array_Type; > pragma pack (Day_Array_Type); -- RAD SOLARIS PORT > > is not packing the array how i would expect. it appears to be padding > each element with 2 bytes to align array elements on word boundries > despite the pragma pack. using rep spec doesnt help because compiler > spits it out as wrong size. > > any ideas??? > > thansk jim [snip]