[fpc-pascal] Re: Lo
Tomas Hajny
XHajT03 at hajny.biz
Thu Jan 13 12:48:45 CET 2011
On Thu, January 13, 2011 11:53, Jonas Maebe wrote:
>
> On 13 Jan 2011, at 09:32, Tomas Hajny wrote:
>
>> On Thu, January 13, 2011 09:01, _-jane-_ at web.de wrote:
>>> A simple but fully functional kludge to make lo compatible with
>>> Delphi is
>>>
>>> type lo=byte;
>>>
>>> Unfortunately for the similar cases of hi and swap you must provide a
>>> function which cannot be used in a manifest constant expression.
>>
>> Well, you should probably mention that this replacement solution is
>> not
>> portable to big endian platforms / targets.
>
> It is portable to big endian targets. byte(longintvar) will return the
> least significant byte on all targets (otherwise there would be almost
> no portability of any integer code between big and little endian
> targets).
OK, sorry for confusion then.
Tomas
More information about the fpc-pascal
mailing list