comma operator

mark.j.purdome markp at cbnewsd.ATT.COM
Fri Aug 4 23:49:37 AEST 1989


>From article <3287 at ohstpy.mps.ohio-state.edu>, by SMITHJ at ohstpy.mps.ohio-state.edu:
> 
> Maybe I'm mistaken, but I'm sure that all the documentation I've read warns
> that the *comma* operator ----does not----- guarantee evaluation in any order.
> Specifically, the Microsoft 5.0 manual mentions this.
> 
If this is true for MSC 5.0, they fixed it in MSC 5.1.
>From MSC 5.1 Language Reference, Section 5.3.11, p. 130:

5.3.11 Sequential-Evaluation Operator

The sequential-evaluation operator evaluates its two operands sequentially
from left to right. ... The sequential-evaluation operator, also called
the "comma operator," is typically used to evaluate two or more expressions
in contexts where only one expression is allowed.



More information about the Comp.lang.c mailing list