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-7-bit Path: g2news1.google.com!postnews.google.com!o26g2000vbi.googlegroups.com!not-for-mail From: milouz Newsgroups: comp.lang.ada Subject: Re: Address and bit mask Date: Tue, 30 Aug 2011 02:14:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <71159ccc-bf20-4fcf-a7f1-3b90629c1ecb@l4g2000vbv.googlegroups.com> <87fwkk0zv7.fsf@ludovic-brenta.org> NNTP-Posting-Host: 82.124.211.130 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1314697443 17665 127.0.0.1 (30 Aug 2011 09:44:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 30 Aug 2011 09:44:03 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: o26g2000vbi.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:20730 Date: 2011-08-30T02:14:31-07:00 List-Id: Ok, thank you very much for all your answers, but I'm not really more advanced. Let me summarize : - my question was about address arithmetic (howto ?) - Some fellows gave me cues about the use of the System.Storage_Elements, but without gaving any concrete example. - Some others just wandered about the need of doing address arithmetic. Hum... well... I still do not know how to do some simple arithmetic with address. So, let me give you an example in C : p = (char*) (((unsigned long)p + ALIGN_MASK) & ~ALIGN_MASK); How do you write that in Ada ?