Mail Archives: djgpp/1999/05/13/18:25:22
El día Thu, 13 May 1999 09:47:48 +0300 (EET DST), Pasi Franti
<franti AT cs DOT joensuu DOT fi> escribió:
>
>> Ok. thanx. it is like here then:
>>
>> typedef unsigned short U16;
>> typedef unsigned long U32;
>> typedef unsigned char BYTE;
>
>I disagree.
>
>I did not follow your discussion but how did you come up to such
>conclusion? You can never be sure of how many bits are int and
>long types without checking it! So what makes you think that
>unsigned long would be different case? As far as I know, it is
>more likely to be U64 as we use 32-bit compilers where int is
>32 bits and long 64 bits.
In djgpp (and many other 32 bit compilers) int and long int are
exactly the same thing (32 bits).
>In fact, even char is not necessary 8 bits even though it is
>so almost everywhere.
No, but a char is always one byte wide (a byte is not always 8-bit
wide, though).
>
>If you have some reasoning for this, please let me know.
>
He was just saying that he would use those typedefs (U16, U32, BYTE)
in his code and then define them as appropiate for every supported
compiler / OS.
Regards,
GUILLE
----
Guillermo Rodriguez Garcia
XXguille AT XXiies DOT XXes (ya sabes :-)
- Raw text -