English
Language : 

CC78K4 Datasheet, PDF (75/523 Pages) NEC – CC78K4 Ver.2.30 or Later, C Compiler Language
CHAPTER 5 OPERATORS AND EXPRESSIONS
(2) Function call operators
Postfix Operators
( ) Function Call
FUNCTION
The postfix ( ) operator calls a function. The function to be called is specified with a postfix expression and
argument(s) to be passed to the function are indicated in parentheses ( ).
The description related to function includes the function prototype declaration, the function definition (the body of
a function), and the function call. The function prototype declaration specifies the value a function returns, the
type of argument, and the storage class.
If the function prototype declaration is not referred to in a function call, each argument is extended with a general
integer. This is called “default actual argument extension”. Performing a function prototype declaration avoids
default actual argument extension and detects errors in of the type and number of arguments and the type of
return value.
Calling a function that has neither a storage class specification nor a data type specification such as “identifier (
);” is interpreted as calling a function that has an external object and returns an int type that has no information
on arguments. In other words, the following declaration will be made implicitly.
extern int identifier ( ) ;
SYNTAX
postfix-expression (argument-expression list);
[Example of function call]
int func (char, int);
char a ;
int b, ret;
void main(void){
ret = func(a, b);
}
int func(char c, int i) {
:
return I;
}
/* function prototype declaration */
/* function call */
/* function definition */
NOTE
A function that returns an object other than array types can be called with this operator. The postfix expression
must be of a pointer type to this function.
In a function call including a prototype, the type of argument must be of a type that can be assigned to the
corresponding parameter(s). The number of arguments must also be in agreement.
User’s Manual U15556EJ1V0UM
75