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,7e490a18b9688bd9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.20.225 with SMTP id q1mr487929pbe.22.1315995510288; Wed, 14 Sep 2011 03:18:30 -0700 (PDT) Path: m9ni6022pbd.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array Date: Wed, 14 Sep 2011 11:18:30 +0100 Organization: A noiseless patient Spider Message-ID: References: <1e6rw4vto3ldb.i8d7fxixapx4.dlg@40tude.net> <12t67nj6zlq5u$.f0bz4sdy17te.dlg@40tude.net> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+yc+queiTmC8alns7aDsH3Uf5neROstb0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:I0uDXnAPuQw/Cmpv34HOqlS50I4= sha1:5q8BEoK14/YbD81QOXeZDzrxTaY= Xref: news1.google.com comp.lang.ada:17959 Content-Type: text/plain; charset=us-ascii Date: 2011-09-14T11:18:30+01:00 List-Id: "Dmitry A. Kazakov" writes: > On Wed, 14 Sep 2011 11:40:01 +0200, Dmitry A. Kazakov wrote: > >> -- Little endian implementation of Get for Unsigned_16 >> procedure Get >> ( Source : Stream_Element_Array; >> Index : in out Stream_Element_Offset; >> Data : out Unsigned_16 >> ) is >> begin >> Data := Stream_Element'Pos (Source (Index)) + >> Stream_Element'Pos (Source (Index + 1)); > > Rather: > > Stream_Element'Pos (Source (Index + 1)) * 256; That's an implementation where both the stream and the processor are little-endian.