Let's the fight begin !
:-)

Dimanche 11 Février 2001 23:21, Timo Kinnunen a écrit:

> To me, this:
> long i;
> unsigned short j;
>
> is more readable than this:
> Int32 i;
> UInt16 j;
>
> I guess this is a good subject to fight a holy war over :)

I use for years ( not to say decennies... ) the following typedef :

typedef signed char     SBYTE;  // signed   byte      (  8 bits )
typedef unsigned char   UBYTE;  // unsigned byte      (  8 bits )

typedef signed short    SWORD;// signed   word      ( 16 bits )
typedef unsigned short  UWORD;// unsigned word      ( 16 bits )

typedef signed long     SLONG;  // signed   long word ( 32 bits )
typedef unsigned long   ULONG;  // unsigned long word ( 32 bits )

I never had to change these typedef, since they are valid on most if not any 
compilers.
And if one day I need to use a strange compiler, I know there will be only 
some of these six lines to change, nothing else...

As an exemple, when changing from SDK 3.1 to SDK 3.5, I didn't have to change 
any line of my own source code, just the ones which was calling the API ! :-)

-- 
Daniel Morais



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to