[fpc-pascal] Endian & Hex numbers

Torsten Bonde Christiansen tc at epidata.info
Mon Apr 13 15:06:18 CEST 2015


Hi list.

Please forgive me if this is too dumb a question, but:

When using a const written in hex, is the order significant?
Ie. will eg. $1F01 result in the same value (7937) on both big-endian 
and little endian machines?


Likewise, if I use an absolute reference to a variable is the endianness 
also significant?
ex.:

const
   A: SmallInt = $1F01;

var
   B: array[0..1] of byte absolute A;


Will B[0] be the same on both types of endian machines?

Regards,
Torsten.









-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150413/778394bd/attachment.html>


More information about the fpc-pascal mailing list