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,c705819cb47d80d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!atl-c05.usenetserver.com!news.usenetserver.com!in01.usenetserver.com!news.usenetserver.com!atl-c08.usenetserver.com!news.usenetserver.com!pc03.usenetserver.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Q: Portable Ada floating-point binary I/O ? References: <44f09ac3$1_3@news.bluewin.ch> <44f201b0$1_6@news.bluewin.ch> From: Stephen Leake Date: Mon, 28 Aug 2006 07:55:12 -0400 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (windows-nt) Cancel-Lock: sha1:ZsikPWauX3oBItIC0JolBEgO+H0= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 4e46444f2d9a0759e00d413297 Xref: g2news2.google.com comp.lang.ada:6418 Date: 2006-08-28T07:55:12-04:00 List-Id: Gautier writes: > > However, the problem is - what does "portable" mean here? Range and > > precision cannot be portable, unless types aren't communicated as well. > > In my case, it should not be a problem; I have a deterministic file > format with some items expected as GL.Double, others as GL.Float. I > just want to ensure that the same file will be correctly read by a PC, > a Mac or a Playstation. Those are all IEEE hardware, so all you need is byte-endianness conversions. See SAL http://stephe-leake.org/ada/sal.html for that, in particular sal-endianness_gnat_x86.ads, sal-network_order.ads, and sal-math_float-network_order.ads. -- -- Stephe