Mail Archives: djgpp/1997/12/10/20:20:42
At 08:34 12/10/1997 GMT, diego wrote:
>Hi,
>
> I turn on the pc and run rhide again, but to my surprise the proyect
>did not work. After a while I realized that type size had changed!!!!!
>
> Now after a sizeof(...) here is what I get:
>char -> 1byte
>int -> 4bytes
>long int -> 4bytes
>....
>
> As you can see char is now 1byte long, and long int is just like an
>ordinary int!!! (They also have ranges of 256, etc. of the size
>reported).
This is perfectly normal. `int' is a 32-bit value, and so is `long int'.
`char' is supposed to be one byte in size. It's legal for `long int' to be
the same size as `int', as long as it isn't shorter.
Did you expect them to be different? If so, why?
Nate Eldredge
eldredge AT ap DOT net
- Raw text -