4 ms·
> it's because expressions separated by a comma can be evaluated in any order (I believe). Expressions separated by the comma operator are always evaluated lef
by dzorz 16y ago
> it's because expressions separated by a comma can be evaluated in any order (I believe).
Expressions separated by the comma operator are always evaluated left to right. On the other hand function arguments (which are separated by comma) can be evaluated in any order.
- jpr 16y ago> Expressions separated by the comma operator are always evaluated left to right. That's correct (for C), but I feel the need to add that in function calls the parameters are separated by commas, and they can be evaluated in any order.
- mfukar 16y agoIn the contexts of a function declaration/definition/call, comma is not acting as an operator.