Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!bu-cs!buengc!bph From: bph@buengc.BU.EDU (Blair P. Houghton) Newsgroups: comp.lang.c Subject: Re: comma operator Message-ID: <3611@buengc.BU.EDU> Date: 4 Aug 89 17:19:18 GMT References: <10099@mpx2.mpx.com> <93@microsoft.UUCP> <10100@mpx2.mpx.com> <44c53d5b.f9df@gtephx.UUCP> <1351@cbnewsl.ATT.COM> <3287@ohstpy.mps.ohio-state.edu> Reply-To: bph@buengc.bu.edu (Blair P. Houghton) Followup-To: comp.lang.c Organization: Boston Univ. Col. of Eng. Lines: 31 In article <3287@ohstpy.mps.ohio-state.edu> SMITHJ@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?"