[fpc-pascal] Re: Endian issues when porting FPC programs from x86 to other platforms
Bo Berglund
bo.berglund at gmail.com
Tue Nov 2 19:04:10 CET 2010
On Tue, 02 Nov 2010 09:32:36 +0100, Thomas Schatzl
<tom_at_work at gmx.at> wrote:
>Hi,
>
>> Or maybe this is a moot question if FPC is only so far running on
>> platforms that have the same endian as x86 CPU:s? I have no
>> information on this though...
>>
>> I can see at least these targets:
>> - Windows and Linux on x86 CPU:s
>> - Embedded Linux on ARM CPU:s
>
>Sparc, PowerPC are big endian, there is an ARM big endian target too.
>
>Use BEtoN, NtoBE if the source is known to be big endian.
>
>(http://www.freepascal.org/docs-html/rtl/system/beton.html)
>(http://www.freepascal.org/docs-html/rtl/system/ntobe.html)
>
Thanks, that helps a lot! Are there also overloaded BEtoN functions
for floating point values?
Like so:
function BEtoN(const AValue: Single):Single;
function BEtoN(const AValue: Double):Double;
--
Bo Berglund
Developer in Sweden
More information about the fpc-pascal
mailing list