Mail Archives: djgpp/1999/08/11/23:38:42
sephiroth wrote:
>
> Yes, you just discovered a miracle. Well not really. From my knowledge just
> putting "int" as the data type will make an integer which can vary between short
> or long I think( in a technical way, sorry it's 1:04am and I want to go to bed).
> But when you write the int to a file it writes it as a long, same a reading.
> Amazing? I always get by this problem by specifically defining a short or a
> long. I think this is good practice.
Most protected mode compilers compile based on a 32 bit integer.
DJGPP does this.
For anyone who doesn't already know this (it is pretty common
knowledge), in DJGPP:
char = 1 byte
short = 2 bytes
int = 4 bytes
long = 8 bytes
And please don't ask about the time I took a new way to do fixed
point math to a CS professor who thought it was brilliant and he sent
me to a Computer Engineering prof who said, "Yes, congrats, you just
rediscovered floating point." That was a bad day.
Chris
--
I know that I will never be politically correct,
and I don't give a damn about my lack of etiquette!
-- Meatloaf
- Raw text -