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,ded6ba3fc5b87b66 X-Google-Attributes: gid103376,public From: Andreas Schulz Subject: Re: First time Ada has let me down Date: 2000/10/26 Message-ID: <39F7D819.B720DAB7@nord-com.net>#1/1 X-Deja-AN: 685999623 Content-Transfer-Encoding: 7bit References: <8FD7DEBEEsynoptikdamudderfuck@news> <3A46E0A5.6C9EC5FD@telepath.com> X-Accept-Language: de,en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@newsfeed.nordcom.net X-Trace: newsfeed.nordcom.net 972544219 30575 213.168.193.53 (26 Oct 2000 07:10:19 GMT) Organization: frei & daheim Mime-Version: 1.0 NNTP-Posting-Date: Thu, 26 Oct 2000 07:10:19 +0000 (UTC) Newsgroups: comp.lang.ada Date: 2000-10-26T00:00:00+00:00 List-Id: Ted Dennison wrote: > It also works for modular integer types (Ada95 only) and *arrays* of booleans > (which can be packed). Either one will do what you want. But if you also want > to work with the data as integers, its silly to do it this way, then have to > Unchecked_Convert all over the place. Let the record rep clause do the work > for you! I recently tried something similar to eveluate a slightly more complex binary data structure, which ended up as a bunch of nested variant records with representation clauses, using almost all possible sizes from 1..32 bits. Compiling with GNAT, that resulted in several errors like : 'fields of "XXX" must start at storage unit boundary' Apparently, GNAT doesn't like unaligned variant records, or is there any way around that limitation (besides using '/'/mod/and, which is how this stuff is handled now) ? A. Schulz