Re: Q: Portable Ada floating-point binary I/O ?
- From: Stephen Leake <stephen_leake@xxxxxxxxxxxxxxxx>
- Date: Mon, 28 Aug 2006 07:55:12 -0400
Gautier <gautier@xxxxxxxxxxxxxxx> 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
.
- References:
- Q: Portable Ada floating-point binary I/O ?
- From: Gautier
- Re: Q: Portable Ada floating-point binary I/O ?
- From: Dmitry A. Kazakov
- Re: Q: Portable Ada floating-point binary I/O ?
- From: Gautier
- Q: Portable Ada floating-point binary I/O ?
- Prev by Date: Re: What does -gnato do?
- Next by Date: Re: Enumeration type - GNAT 3.15p bug?
- Previous by thread: Re: Q: Portable Ada floating-point binary I/O ?
- Next by thread: Re: Portable Ada floating-point binary I/O ?
- Index(es):