comma operator

michael.p.lindner mpl at cbnewsl.ATT.COM
Sat Aug 5 01:50:38 AEST 1989


In article <3287 at ohstpy.mps.ohio-state.edu>, SMITHJ at ohstpy.mps.ohio-state.edu writes:
> In article <1351 at cbnewsl.ATT.COM>, mpl at cbnewsl.ATT.COM (michael.p.lindner) writes:
> > Sigh.  RTFM!  The comma operator guarantees left to right evaluation,
> 
> 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.
> 
> /* Jeffery G. Smith, BS-RHIT (AKA Doc. Insomnia, WMHD-FM)       *

Then
	a) you haven't read K&R (original or second edition)
	b) you haven't read the ANSI standard

since these all state specifically that the comma operator evaluates left
to right.

corollary
	MSC 5.0 doesn't follow either K&R or ANSI C standard

I stand by my original statement.

Mike Lindner
attunix!mpl
AT&T Bell Laboratories
190 River Rd.
Summit, NJ 07901



More information about the Comp.lang.c mailing list