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.9 required=5.0 tests=BAYES_00 autolearn=ham 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-7-bit Path: g2news1.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Using representation clauses in networking software Date: Sun, 15 Aug 2010 16:58:16 +0100 Organization: A noiseless patient Spider Message-ID: References: <8739ugqfeb.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 15 Aug 2010 15:58:16 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="16510"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+d/8N8KnYCQEmgQBzlpVpzKaNmkWd9yeE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:9d+XOZ7UCrJXosEYCqujPMx1x5U= sha1:JwmTF/cOjJPLMNSl3DTCCS1KiDk= Xref: g2news1.google.com comp.lang.ada:13344 Date: 2010-08-15T16:58:16+01:00 List-Id: Florian Weimer writes: > Have there been any efforts to fix representation clauses so that they > are suitable for expressing elements commonly found in networking > protocols? > > My understanding is that representation clauses are totally unsuitable > for this purpose because they do not allow the programmer to express > endianness. I dimly recall a technical report which argued that > expressing endianness portably was impossible. However, Erlang's bit > syntax seems to be a counterexample, so I wonder if that issue has > been picked up in recent years. I haven't tried it but .. http://www.adaic.com/standards/05rm/html/RM-13-5-3.html