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 <[email protected]>: > On Sun, Dec 21, 2008 at 6:26 AM, Dave Coventry <[email protected]> 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 > [email protected] > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
