[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms
jonas.maebe at elis.ugent.be
Tue Nov 2 23:00:35 CET 2010
On 02 Nov 2010, at 21:39, Felipe Monteiro de Carvalho wrote:
> On Tue, Nov 2, 2010 at 7:04 PM, Bo Berglund <bo.berglund at gmail.com> wrote:
>> Thanks, that helps a lot! Are there also overloaded BEtoN functions
>> for floating point values?
> I think that single and double have always the same binary layout.
That's incorrect, their endianess changes in the same way as that of integer data (except on ARM when using the FPA floating point unit, which uses its own special byte ordering).
There are no overloads of BEtoN() etc for floating point types in the system unit. You can convert them by putting them in a variant record with an overlaid floating point and integer field of the same size, and then swapping the integer field.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-pascal