[Tfug] Byte Order

Rich Smit rfs_lists at mac.com
Fri Nov 17 12:26:16 MST 2006


Felix Tilley wrote:
 > I snipped the C file.  I have no means to test it.  I assume this does
 > not work on unsigned integers.  Is this correct?  Anyway, this looks
 > like a very useful program.

Thanks Felix. You're right -- signed short ints only. I didn't give any 
thought to extending it, but tried to keep the code somewhat readable 
(yeah, except for that power-of-two business...). Jim was talking about 
the byte order of short ints, then he mentioned getting the sign in the 
right place; so in a way, it's an answer to his question interpreted as 
an exercise in C. Just like being back in Uni...
-- 
Rich.





More information about the tfug mailing list