int). Otherwise, it's best to give yourself flexibility.
However, types that merely wrap existing C types are not helpful:
typedef unsigned char UChar; // Bad usage
typedefbased on the function of the type, not its concrete representation. To help you with this, the header file
PrimitiveTypes.hcontains useful definitions of primitive types. Two ANSI C header files,
limits.h, contain definitions as well, here are two:
The type returned by the built-in C
||A type that can represent the difference between any two pointers.|
You might have noticed that these names don't conform to Taligent conventions. In the interest of clarity and portability, it is better to use the names as defined by ISO/ANSI C. However, a useful non-ISO/ANSI C type is
void*, which is for pointers to raw storage.
If a data type is unsigned, declare it
unsigned; this helps avoid nasty bugs down the road.
[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.