HP C/iX Reference Manual (31506-90011)

Chapter 3 47
Data Types and Declarations
Type Definitions Using typedef
unsigned li x;
typedef identifiers occupy the same name space as ordinary identifiers and follow the
same scoping rules.
Structure definitions which are used in typedef declarations can also have structure tags.
These are still necessary to have self-referential structures and mutually referential
structures.
Example
typedef unsigned long ULONG; /* ULONG is an unsigned long */
typedef int (*PFI)(int); /* PFI is a pointer to a function */
/* taking an int and returning an int */
ULONG v1; /* equivalent to "unsigned long v1" */
PFI v2; /* equivalent to "int (*v2)(int)" */