comma operator

Blair P. Houghton bph at buengc.BU.EDU
Sat Aug 5 03:19:18 AEST 1989


In article <3287 at ohstpy.mps.ohio-state.edu> SMITHJ at ohstpy.mps.ohio-state.edu writes:
>
>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.

HAHAHAHEEHEEEHOHOHOHOHAHAHEEEEEEhaaaawheheheeeehoohohohohaha

Whinny!  Laughed myself horse on that one.

You're probably not mistaken, though; I don't doubt a bit that a
Microsoft compiler for any language would implement it in such a way as
to controvert every tenet of the language's original specifications.
I've been pounding on the Pascal compiler for a couple of weeks,
discovering literally dozens of such misfeaturings.  All this and
it's to control a store-bought data-acquisition board and DSP processor,
so any bug appears as if magnified by a 100-inch telescope.

My point, here, is that it is folly to either:  a) Use a Microsoft
product as a standard for anything other than microsoft products; or
b) Trust portability in any form for any feature of a compiler that
isn't nailed down by ANSI, and for C that's a null set, as yet.

Order of evaluation for the comma operator may well be un-guaranteed,
and therefore unportable.

Caveat programmator.

				--Blair
				  "Perhaps I could interest you
				   in a few sums of pointers?"



More information about the Comp.lang.c mailing list