[Lazarus] reading a little endian long.

Dave Coventry dgcoventry at gmail.com
Sun Dec 21 09:26:41 CET 2008


Is there any documentation on this?
would the following:

longv:=LEtoN(@buffer[5]);

be the same as:

longv:=buffer[5];
longv+=buffer[6] shl 8;
longv+=buffer[7] shl 16;
longv+=buffer[8] shl 24;


2008/12/21 Andrew Haines <andrewd207 at aol.com>:
> Yes. See LEtoN, BEtoN, NtoLE and NtoBE.
>
> BlockRead(F, FooLongInt, 4);
>
> FooLongInt := LEtoN(FooLongInt);
>
> Regards,
>
> Andrew
> _______________________________________________
> Lazarus mailing list
> Lazarus at lazarus.freepascal.org
> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
>



More information about the Lazarus mailing list