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: a07f3367d7,7e490a18b9688bd9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array Date: Wed, 14 Sep 2011 11:41:29 +0200 Organization: cbb software GmbH Message-ID: <12t67nj6zlq5u$.f0bz4sdy17te.dlg@40tude.net> References: <1e6rw4vto3ldb.i8d7fxixapx4.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:20930 Date: 2011-09-14T11:41:29+02:00 List-Id: 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; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de