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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,be97e82d84e1ded9 X-Google-Attributes: gid103376,public From: claveman@fern.mil (Charles H. Sampson) Subject: Re: Packing Records Using Size Attribute Definitions Clauses Date: 1998/11/30 Message-ID: <1djbqm0.6p06zijzpi0oN@u2n207167116164.inetworld.net>#1/1 X-Deja-AN: 417353594 References: <1998Nov18.230626.16278@nosc.mil> <73589m$pnj$1@nnrp1.dejanews.com> <01be158e$fc0e7da0$0e2915c0@w95> X-Trace: news2.randori.com 912487236 207.167.116.164 (Mon, 30 Nov 1998 20:40:36 PDT) NNTP-Posting-Date: Mon, 30 Nov 1998 20:40:36 PDT Newsgroups: comp.lang.ada Date: 1998-11-30T00:00:00+00:00 List-Id: Many thanks to all for these responses. In particular, Tucker's reference to 13.3(53) seems to be the crucial point I was missing, at least after I ran down what "internal layout" means. I certainly have no disagreement with the main point made, that a size clause is not the way to cause records to be packed. (I inherited the code I'm porting, so it can't be blamed on me.) I never understood the purpose of that feature of Ada 83. I can't conceive of a case in which I would want to specify the amount of memory allocated to a record but I wouldn't particularly care where its components were. Can anybody think of a use for such a thing? On the other hand, I disagree with Robert's assertion that packing by means of size clauses was not intended in Ada 83. Certainly he is far more qualified than I to speak of intent, being active while the de- tails of the language were being hammered out. I have to rely on what was written in the LRM and when I read, "The value of the expression specifies an upper bound for the number of bits to be allocated to ob- jects of the type ..." and "A size specification for a composite type may affect the size of the gaps between the storage areas allocated to consecutive components" it sounds a lot like packing. (He does refer to an AI on the subject and AI-0553 looks like it might be the one, based on its title. I'd like to read it, but I can't find it. Are they still available somewhere? I deleted those I had only a few months ago.) Whatever. The upshot is that I have an unexpected source change to make while I'm porting the code. Not a big thing, but something of a surprise. Charlie -- For an email response, my user name is "sampson" and my host is "spawar.navy.mil".