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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.18.4 with SMTP id s4mr8098498igd.5.1391161897326; Fri, 31 Jan 2014 01:51:37 -0800 (PST) X-Received: by 10.140.96.37 with SMTP id j34mr663qge.34.1391161897287; Fri, 31 Jan 2014 01:51:37 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!news.glorb.com!c10no7440542igq.0!news-out.google.com!s3ni1635qas.0!nntp.google.com!f11no10883280qae.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 31 Jan 2014 01:51:37 -0800 (PST) In-Reply-To: <1txs6yifzioke$.30cghpl6qq1j$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=81.166.54.34; posting-account=bXa9kQoAAADQ0LSY80qTyLW4hcbm0Soz NNTP-Posting-Host: 81.166.54.34 References: <20a36d96-850e-4020-8dfa-777eb9c944f4@googlegroups.com> <9e27abb7-e944-4bd4-a10c-600fe4da7872@googlegroups.com> <56a5aeb6-8704-457c-a24f-b664746afe72@googlegroups.com> <13pvagjpwejni$.1e8ll5btxg1f5$.dlg@40tude.net> <5bf8c737-b99d-4069-885f-03fe82f06cc6@googlegroups.com> <14k7gbu5ws82b.3pn20kh5ci50.dlg@40tude.net> <1txs6yifzioke$.30cghpl6qq1j$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Binary and XML serialization of types From: hanslad@gmail.com Injection-Date: Fri, 31 Jan 2014 09:51:37 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:18341 Date: 2014-01-31T01:51:37-08:00 List-Id: > > > In that case you can use the implementations from Simple Components. > > Hello, I am sorry for the late reply on this. Y\Thank you for all the answers. I have looked briefly into Simple Components, and I am impressed by all the funtionalty you have implemented there. One question: You have implemented the litle endian Unsigned_16 Get like this: procedure Get ( Data : in out Stream_Element_Array; Pointer : in out Stream_Element_Offset; Value : out Unsigned_16 ) is begin if ( Pointer < Data'First or else ( Pointer > Data'Last and then Pointer > Data'Last + 1 ) ) then Raise_Exception ( Layout_Error'Identity, "Pointer is out of bounds" ); elsif Pointer + 1 > Data'Last then Raise_Exception (End_Error'Identity, "End of data"); end if; Value := ( Shift_Left (Unsigned_16 (Data (Pointer + 1)), 8) or Unsigned_16 (Data (Pointer)) ); Pointer := Pointer + 2; end Get; Is it assumed that the system is little endian. How will this work on a big endian system? Regards, HP