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,7844279822ce7c28 X-Google-Attributes: gid103376,public From: mcc@entropy.cs.princeton.edu (Martin C. Carlisle) Subject: Re: Newbie question : types , representation Date: 1999/08/23 Message-ID: <7prl4t$22$1@cnn.Princeton.EDU>#1/1 X-Deja-AN: 516176161 References: Organization: US Air Force Academy, Dept of Computer Science Newsgroups: comp.lang.ada Date: 1999-08-23T00:00:00+00:00 List-Id: You need to be very careful with the below. This works fine if, like Cohen, you are ONLY interested in these two representations. I just implemented a Base-64 converter this weekend, and I found the bit order on Win 98 to be frustrating, and GNAT didn't support changing it (or else I was doing it wrong). The modular type worked best for me. Here's what the bits looked like: yyxxxxxx zzzzyyyy wwwwwwzz Note the six bits making up y and z aren't even contiguous. --Martin In article , Wilhelm Spickermann wrote: >The second problem may be solveable using the following parts >(look into Cohen: Ada as a second language, 2nd Ed.; Part 19.4.5 >where he solved the problem of working with Microsofts FAT12 (12 Bit >numbers in a packed array)) > >type Char_64_Array is array (Sometype) of Char_64; >type Packed_Char_64_Array is new Char_64_Array; >for Packed_Char_64_Array'Component_Size use 6; >pragma Pack (Packed_Char_64_Array); -- Martin C. Carlisle, Asst Prof of Computer Science, US Air Force Academy carlislem@acm.org, http://www.usafa.af.mil/dfcs/bios/carlisle.html DISCLAIMER: This content in no way reflects the opinions, standards or policy of the US Air Force Academy or the United States Government.