[fpc-pascal] Endiannes & programmer's manual - missing compiler define?

Reinier Olislagers reinierolislagers at gmail.com
Tue Jun 5 10:55:59 CEST 2012


On 5-6-2012 10:20, Marco van de Voort wrote:
> In our previous episode, Reinier Olislagers said:
>>
>> Also, I'm sure there must be functions to convert endianness - at least
>> network byte order (big endian) to host order.
<snip>
>> Are there an equivalent RTL/FCL functions?
> 
> Yes, but don't use them.
> 
> There are independent endian routines in system.  Search for swapendian and
> BEtoN, NtoBE etc.
Thanks.

> Do not abuse network routines for non network usage.
I hear & obey ;)
Updated the wiki:
http://wiki.lazarus.freepascal.org/Writing_portable_code_regarding_the_processor_architecture#Changing_Endianness

Thanks,

Reinier




More information about the fpc-pascal mailing list