Top "Comma-operator" questions

How do I put two increment statements in a C++ 'for' loop?

I would like to increment two variables in a for-loop condition instead of one. So something like: for (int i = 0; …

c++ for-loop comma-operator
How does the Comma Operator work

How does the comma operator work in C++? For instance, if I do: a = b, c; Does a end up …

c++ comma-operator
Expected unqualified-id before numeric constant?

I'm getting errors on lines 102, 115, and 128. What am I doing wrong? It says: Expected unqualified-id before numeric constant and I …

c++ comma-operator
When is the comma operator useful?

I read this question about the "comma operator" in expressions (,) and the MDN docs about it, but I can't think …

javascript comma-operator
C++ -- return x,y; What is the point?

I have been programming in C and C++ for a few years and now I'm just now taking a college …

c++ c syntax return-value comma-operator
Uses of C comma operator

You see it used in for loop statements, but it's legal syntax anywhere. What uses have you found for it …

c++ c comma-operator
What does i = (i, ++i, 1) + 1; do?

After reading this answer about undefined behavior and sequence points, I wrote a small program: #include <stdio.h> …

c operators expression compiler-warnings comma-operator
Javascript "tuple" notation: what is its point?

At wtfjs, I found that the following is legal javascript. ",,," == Array((null,'cool',false,NaN,4)); // true The argument (null,'cool',…

javascript syntax tuples comma-operator
What does a comma do in JavaScript expressions?

If I use: 1.09 * 1; // returns "1.09" But if I use: 1,09 * 1; // returns "9" I know that 1,09 isn't a number. What does the comma do …

javascript comma-operator