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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ca7e14ee1b312f90 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-25 10:35:52 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Minimum Record Size? LONG Date: 25 Apr 2003 13:35:43 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1051293053 14852 128.183.235.92 (25 Apr 2003 17:50:53 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 25 Apr 2003 17:50:53 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:36557 Date: 2003-04-25T17:50:53+00:00 List-Id: Dr Nancy's Sweetie writes: > I'm working on a program which has to take four six-bit hunks of data > and regroup them into three eight-bit hunks. Ok > My first pass looked like this: > > > This worked, but it seemed a little klunky. Figuring there ought to > be a better way, I tried an Unchecked_Conversion: Please post actual, complete, compilable code. That makes it easier for us to compile it, add the necessary changes, and post it back. > type Six_Bits is mod 2**6; you probably need a size clause here. > type Four_Sixes is array (0..3) of Six_Bits; and here you need a component size clause, and/or a pragma Pack. same for Three_Group. -- -- Stephe