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,d778a4f52acd9d43 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.75.170 with SMTP id d10mr9467111pbw.6.1324603824149; Thu, 22 Dec 2011 17:30:24 -0800 (PST) MIME-Version: 1.0 Path: lh20ni53621pbb.0!nntp.google.com!news2.google.com!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Representation clauses for base-64 encoding Date: Thu, 22 Dec 2011 19:30:20 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <9lgi3jFhaU1@mid.individual.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1324603823 3615 69.95.181.76 (23 Dec 2011 01:30:23 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Dec 2011 01:30:23 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2011-12-22T19:30:20-06:00 List-Id: "Niklas Holsti" wrote in message news:9lgi3jFhaU1@mid.individual.net... > On 11-12-22 11:41 , Natasha Kerensikova wrote: ... >> type Octet_Block is array (1 .. 3) of Octet; >> pragma Pack (Octet_Block); > > I would add the following, to check that packing is effective: > > for Octet_Block'Size use 24; I think it would probably be better to forget Pack and actually say what you mean here: type Octet_Block is array (1 .. 3) of Octet; for Octet_Block'Component_Size use 8; "Pack" should be reserved for cases where you don't care about the exact layout, you just want to save space. Here you do care about the exact layout, so use a Component_Size. Randy.