English
Language : 

CC78K0S Datasheet, PDF (110/520 Pages) NEC – C Compiler Ver.1.30 or Later Language
CHAPTER 5 OPERATORS AND EXPRESSIONS
5.12 Comma Operator
Comma Operator
,
FUNCTION
The comma operator evaluates the left operand as a void type (that is, ignores its value) and then evaluates the
right operand. The type and value of the result of the comma expression are the type and value of the right
operand.
If a comma has another meaning (as in a list of function arguments or in a list of variable initializations), comma
expressions must be enclosed in parentheses. In other words, the comma operator described in this chapter will
not appear in such a list.
In the following example, the comma operator finds the value of the second argument of the function “f ()”. The
value of the second argument becomes 5.
Int a, c, t;
void main(void) {
f(a,(t=3,t+2),c);
}
SYNTAX
E1 , E2
110
User’s Manual U14872EJ1V0UM