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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8200c5d9633351c4 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!proxad.net!infeed-2.proxad.net!news7-e.free.fr!not-for-mail Date: Fri, 01 Jul 2005 00:26:09 +0200 From: Damien User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.2) Gecko/20040804 X-Accept-Language: fr, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: How to byte swap an IEEE Float? References: <1119966822.201891.303810@g49g2000cwa.googlegroups.com> <42c30054$0$27313$626a14ce@news.free.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <42c47184$0$24923$636a15ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 01 Jul 2005 00:26:12 MEST NNTP-Posting-Host: 82.235.135.166 X-Trace: 1120170372 news7-e.free.fr 24923 82.235.135.166:32786 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:11786 Date: 2005-07-01T00:26:12+02:00 List-Id: Peter Hermann a �crit : > http://www.csv.ica.uni-stuttgart.de/homes/ph/adakurs/invert4bytes.adb > > (this code intentionally prevents compiler optimization) > > (see also > http://www.csv.ica.uni-stuttgart.de/homes/ph/adakurs/stream2ph.adb > ) Those examples only have integer values, for which a function like : function Swap (X : Integer) return Integer; does not raise any problem. Any Integer or Modular type should not be a problem. It is only with floats that problems arise. Damien