Type Specifiers [ HP C/iX Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Reference Manual
Type Specifiers
Type specifiers indicate the format of the storage associated with a
given data object or the return type of a function.
Syntax
type-specifier ::=
char
short
int
long
unsigned
signed
float
double
void
struct-or-union-specifier
enum-specifier
typedef-name
Description
Most of the type specifiers are single keywords. (Refer to chapter 9 for
sizes of types.) The syntax of the type specifiers permits more types
than are actually allowed in the C language. The various combinations of
type specifiers that are allowed are shown in Table 3-1. Type specifiers
that are equivalent appear together in a box. For example, specifying
unsigned is equivalent to unsigned int. Type specifiers may appear in
any order, possibly intermixed with other declaration specifiers.
Table 3-1. C Type Specifiers
------------------------------------------------
| |
| void |
| |
------------------------------------------------
| |
| char |
| |
------------------------------------------------
| |
| signed char |
| |
------------------------------------------------
| |
| unsigned char |
| |
------------------------------------------------
| |
| short, signed short, short int, or signed |
| short int |
| |
------------------------------------------------
| |
| unsigned short, or unsigned short int |
| |
------------------------------------------------
| |
| int, signed, signed int, or no type |
| specifiers |
| |
------------------------------------------------
| |
| unsigned, or unsigned int |
| |
------------------------------------------------
| |
| long, signed long, long int, or signed long |
| int |
| |
------------------------------------------------
| |
| unsigned long, or unsigned long int |
| |
------------------------------------------------
| |
| float |
| |
------------------------------------------------
| |
| double |
| |
------------------------------------------------
| |
| long double |
| |
------------------------------------------------
| |
| struct-or-union specifier |
| |
------------------------------------------------
| |
| enum-specifier |
| |
------------------------------------------------
| |
| typedef-name |
| |
------------------------------------------------
If no type specifier is provided in a declaration, the default type is
int.
Floating-point types in C are float (32 bits), double (64 bits), and long
double (128 bits).
MPE/iX 5.0 Documentation