English
Language : 

CC78K0S Datasheet, PDF (63/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 3 DECLARATION OF TYPES AND STORAGE CLASSES
3.4.2 Array declarators
An array declarator declares to the compiler that an identifier to be declared is an object that has an array type.
Array declaration is performed as shown below.
type identifier [constant expression]
By this declaration, the identifier becomes an array that has the declared type. The value of the constant
expression becomes the number of elements in the array. The constant expression must be an integer constant
expression which has a value greater than 0. In the declaration of an array, if a constant expression is not specified,
the array becomes an incomplete type.
In the following example, a char type array “a[ ]” which consists of 11 elements and a char type pointer array
“ap[ ]” which consists of 17 elements have been declared.
char a[11],*ap[17];
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 which 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 lists. By these lists, an identifier, which indicates 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”.
User’s Manual U14872EJ1V0UM
63