[Lazarus] reading a little endian long.

Dave Coventry dgcoventry at gmail.com
Sun Dec 21 22:29:55 CET 2008


Wow.

If I can push a little more: Can I read in an eight-byte IEEE double
using the same trick?

2008/12/21 Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com>:
> On Sun, Dec 21, 2008 at 6:26 AM, Dave Coventry <dgcoventry at gmail.com> wrote:
>> Is there any documentation on this?
>
> http://www.freepascal.org/docs-html/rtl/system/index-5.html
>
>> would the following:
>>
>> longv:=LEtoN(@buffer[5]);
>>
>> be the same as:
>
> No, it's better. It only performs a conversion from Little Endian to
> current encoding. So it will just copy the contents if your software
> is running in a little endian processor or do the adequate conversion
> if your software is running in a big endian processor.
>
> --
> Felipe Monteiro de Carvalho
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>



More information about the Lazarus mailing list