"Darren New" <dne### [at] san rr com> wrote in message
news:4ae475ef$1@news.povray.org...
> clipka wrote:
>> The best you can do is include a runtime self-test routine in the code to
>> actively check whether compile-time endianness assumptions were right.
>
> At which point the best approach is probably just to pack and unpack the
> bits yourself. :-)
>
I remember having written a game on a portable Unix machine (with a Motorala
68010 processor) and being amazed at what happened with my save files when I
moved to my first DOS machine (with an 80386 processor); I hadn't ever had
to deal with byte order before that. In that case, the save data was
relatively small, so I re-wrote it to save in ASCII printable characters,
which solved that problem. :)
Post a reply to this message
|