English
Language : 

CC78K4 Datasheet, PDF (60/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 3 DECLARATION OF TYPES AND STORAGE CLASSES
In the following two examples of declarations, “x” in the first declaration specifies a pointer to an int type data and
“y” in the second declaration specifies an array to an int type data which has no size specification and is to be
declared elsewhere in the program.
extern int *x;
extern int y [ ];
3.4.3 Function declarators (including prototype declarations)
A function declarator declares the type of return value, argument, and the type of the argument value of a function
to be referenced.
Function declaration is performed as follows.
type identifier (parameter list or identifier list)
By this declaration, the identifier becomes a function that has the parameter specified by the parameter type list
and returns the value of the type declared before the identifier. Parameters of a function are specified by a
parameter identifier list. By these lists, an identifier, which indicates the argument and its type, are specified. A
macro defined in the header file “stdarg.h” converts the list described by the ellipsis (, ...) into parameters. For a
function that has no parameter specification, the parameter list will become “void ”.
3.5 Type Names
A type name is the name of a data type that indicates the size of a function or object. Syntax-wise, it is a function
or object declaration less identifiers.
Examples of type names are given below.
• int ............................. Specifies an int type.
• int * ........................... Specifies a pointer to an int type.
• int *[3] ....................... Specifies an array that has three pointers to an int type.
• int (*) [3].................... Specifies a pointer to an array that has three int types.
• int *( )....................... Specifies a function that returns a pointer to an int type that has no parameter
specification.
• int (*) (void)............... Specifies a pointer to a function that returns an int type that no parameter specification.
• int (*const [ ]) (unsigned int, ...) .... Specifies an indefinite number of arrays that have one parameter of unsigned
int type and an invariable pointer to each function that returns an int type.
3.6 typedef Declarations
The typedef keyword defines that an identifier is a synonym to a specified type. The defined identifier becomes a
typedef name.
The syntax of typedef names is shown below.
typedef type identifier;
60
User’s Manual U15556EJ1V0UM