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.0 required=5.0 tests=BAYES_00,FORGED_HOTMAIL_RCVD2, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,43ad9ab56ebde91c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.75.170 with SMTP id d10mr6054994pbw.6.1323785994623; Tue, 13 Dec 2011 06:19:54 -0800 (PST) Path: lh20ni17969pbb.0!nntp.google.com!news2.google.com!postnews.google.com!r6g2000yqr.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Does Ada support endiannes? Date: Tue, 13 Dec 2011 06:19:54 -0800 (PST) Organization: http://groups.google.com Message-ID: <2f9744b6-4a45-4dd1-9621-c6f5d10166cb@r6g2000yqr.googlegroups.com> References: <23835087-313f-427c-b37e-4ff1bdef9d57@r6g2000yqr.googlegroups.com> <108d5437-ae36-4e79-ad4e-aab3b903d0f4@gl2g2000vbb.googlegroups.com> NNTP-Posting-Host: 81.62.204.93 Mime-Version: 1.0 X-Trace: posting.google.com 1323785994 13424 127.0.0.1 (13 Dec 2011 14:19:54 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 13 Dec 2011 14:19:54 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: r6g2000yqr.googlegroups.com; posting-host=81.62.204.93; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKUARELSC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2,gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2011-12-13T06:19:54-08:00 List-Id: On 12 d=E9c, 13:44, Gerd wrote: > Any suggestion on how to convert, others that "/" and "mod"? If you use "/" and "mod" (or "shift"'s and "and"'s to go faster) and use endianess only for I/O, you'll have perfectly portable solution on a wide range of compilers and operating systems. See this: http://unzip-ada.sf.net/ for an example. HTH _________________________ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address