Mail Archives: djgpp/1996/04/28/18:38:56
In article <4m03nd$nsc AT freenet-news DOT carleton DOT ca>, br516 AT FreeNet DOT Carleton DOT CA (Nicholas Lynch) writes:
> Borland C/C++:
>
> Variable Size
> ---------------------
> int 2
> unsigned int 2
> long 4
> ...
>
> But in DJGPP:
>
> Variable Size
> ---------------------
> int 4
> unsigned int 4
> long 4
> ...
>
> Is there any way of correcting this?
There isn't anything wrong! DJGPP is a 32-bit compiler, as opposed to Borland
C/C++ which is 16-bit. So, an int in Borland is 16 bits, but in DJGPP it is 32
bits. If you want a 16-bit int (also called a word), use "short" or "unsigned
short". The use of long has no effect in DJGPP since int's are "long" (32 bit)
by default.
I'm sure this is in the FAQ, but if it isn't it should be.
Adios
Mark Wodrich.
- Raw text -