Download 78K0 Coding - Renesas Electronics

Transcript
CubeSuite+ V1.01.00
CHAPTER 3 COMPILER LANGUAGE SPECIFICATIONS
(2) Character types
There are 3 char data types.
- char
- signed char
- unsigned char
(3) Incomplete types
There are 4 incomplete data types.
- Arrays with indefinite object size
- Structures
- Unions
- void type
(4) Derived types
There are 5 derived data types.
- Array type
- Structure type
- Union type
- Function type
- Pointer type
(a) Array type
An array type describes a contiguously allocated set of objects with a particular member object type, called the
element type.
All member objects have the area of the same size. Array types and individual elements can be specified. It is
not possible to create an incomplete array type.
(b) Structure type
A structure type describes a sequentially allocated set of member objects, each of which has an optionally
specified name and possibly a distinct type.
Remark
Array and structure types are collectively called aggregate types. The member objects in
aggregate types are allocated sequentially.
(c) Union type
A union type describes an overlapping set of member objects.
Each member of a union has an optionally specified name and possibly a distinct type. Union members can
be specified individually.
(d) Function type
A function type describes a function with the return value of the specified type.
A function type is characterized by its return value type and the number and types of its parameters.
If its return value type is T, the function is called a "function returning T".
(e) Pointer type
A pointer type may be derived from a function type, an object type, or an incomplete type, called the
referenced type.
A pointer type describes an object whose value provides a reference to an entity of the referenced type.
A pointer type derived from the referenced type T is sometimes called a "pointer to T".
R20UT0782EJ0100 Rev.1.00
Oct 01, 2011
Page 63 of 836