Previous: Conditional Expression, Up: Execution Control Expressions [Contents][Index]
The comma operator stands for sequential execution of expressions. The value of the comma expression comes from the last expression in the sequence; the previous expressions are computed only for their side effects. It looks like this:
exp1, exp2 …
You can bundle any number of expressions together this way, by putting commas between them.
• Uses of Comma | When to use the comma operator. | |
• Clean Comma | Clean use of the comma operator. | |
• Avoid Comma | When to not use the comma operator. |