Portability? I'm using the same system to read and write.This is one of the reasons Prelude stresses portability so much.
Yes, I'm on a pc. After reading a little bit about endians, I think it has to do with the cast. I think the reason I don't get 12,594 for the output is that the cast assumes a certain endian, and if your system does not employ that endian, then things get flipped around. Therefore, the cast takes this in the file:Because you are on a little endian machine. Let me guess, a PC?
and flips it around to this:
which is the number 12,849