NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages

A typedef declaration introduces a name that, within its scope, becomes a synonym for the type given by the type-declaration portion of the declaration.

typedef type-declaration synonym;

You can use typedef declarations to construct shorter or more meaningful names for types already defined by the language or for types that you have declared. Typedef names allow you to encapsulate implementation details that may change.

A typedef declaration does not introduce a new type - it introduces a new name for an existing type. Here are a few examples of how to use the typedef keyword:

typedef char FlagType;
const FlagType x;
typedef char CHAR; // Character type.
CHAR ch;
typedef unsigned long ulong;
ulong ul; // Equivalent to "unsigned long ul;"