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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,826cd690cb6a7585 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!t5g2000yqj.googlegroups.com!not-for-mail From: milouz Newsgroups: comp.lang.ada Subject: Re: Address and bit mask Date: Wed, 31 Aug 2011 00:45:19 -0700 (PDT) Organization: http://groups.google.com Message-ID: <24db86cf-940c-4d95-b21d-ad819cd77142@t5g2000yqj.googlegroups.com> References: <71159ccc-bf20-4fcf-a7f1-3b90629c1ecb@l4g2000vbv.googlegroups.com> <87fwkk0zv7.fsf@ludovic-brenta.org> <7d70b603-a03d-456a-b775-1325eac83aa0@t30g2000prm.googlegroups.com> NNTP-Posting-Host: 82.124.211.130 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1314776719 22085 127.0.0.1 (31 Aug 2011 07:45:19 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 31 Aug 2011 07:45:19 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: t5g2000yqj.googlegroups.com; posting-host=82.124.211.130; posting-account=2RsWdAoAAACKmfJMpyMjxrxuBA0nNyCZ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRUAELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.107 Safari/535.1,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20767 Date: 2011-08-31T00:45:19-07:00 List-Id: On Aug 30, 5:14=A0pm, Adam Beneschan wrote: > If the reason you want to do address arithmetic is something else, > though, you're welcome to ask about it, but rather than giving us C > code with no context and asking us how to translate it, please give us > a bigger-picture description of what you're trying to accomplish Ok, so I'll try to be more precise. I have to parse a list of chunks which are 4 bytes aligned. Each chunk is like this: [ size | data ] The 'size' field is a 32-bit unsigned integer and it's the size of the whole chunk. The 'data' field has various lenght (>=3D 1 byte). I can solve that problem in a C-ish style, but I wonder what is the proper way to solve that problem in Ada.