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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5ae752c88e0dde5e X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Using representation clauses in networking software Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8739ugqfeb.fsf@mid.deneb.enyo.de> <43fkp7an4c5m$.3db3n6adym42.dlg@40tude.net> <8739ugkka6.fsf@mid.deneb.enyo.de> Date: Sun, 15 Aug 2010 17:04:15 +0200 Message-ID: <1pjh30gv98n9t$.lycfvhr1l9rz$.dlg@40tude.net> NNTP-Posting-Date: 15 Aug 2010 17:04:13 CEST NNTP-Posting-Host: ace043b1.newsspool3.arcor-online.net X-Trace: DXC=59UN41VLo4FWDmlTRbh@=IMcF=Q^Z^V3H4Fo<]lROoRA8kF9METL0D?aS[VO X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:13339 Date: 2010-08-15T17:04:13+02:00 List-Id: On Sun, 15 Aug 2010 16:44:33 +0200, Florian Weimer wrote: > * Dmitry A. Kazakov: > >> On Sun, 15 Aug 2010 15:44:34 +0200, Yannick Duch�ne (Hibou57) wrote: >> >> (I agree with what you wrote. I am programming a lot of communication >> stuff, but never used representation clauses to handle endianness.) > > This is not surprising because the current representation clauses > cannot handle it. What for, if there are better ways to handle it? Representation layout clause was invented for handling something in place. It is no more actual, because reading out/writing in with an appropriate recoding is cleaner and possibly cheaper on modern hardware. > I wonder if there has been any attempt to enhance representation > clauses so that they are useful in this context. To handle all possible cases of mixed-endian? To handle non-2's complement integers? IEEE, IBM, DEC float layouts? Layouts of Character like EBCDIC, KOI-7/8 etc? It would be a mammoth task to accomplish. What is the gain? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de