Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!mit-eddie!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP Newsgroups: comp.lang.c Subject: Re: comma operator Message-ID: <1866@bsu-cs.UUCP> Date: 16 Jan 88 18:35:15 GMT References: <3819@sigi.Colorado.EDU> <8599@ism780c.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 16 Posted: Sat Jan 16 13:35:15 1988 I respectfully suggest that the comma operator be used only where it is essential, and not for convenience. Why? Because of the following strange situation. The comma operator is one of the features of C that is used only rarely, the only common usages being in for loop expressions and in macros. For this reason compiler writers may not test it as exhaustively as they might, for example, test assignments or arithmetic operators. So it is more likely that your code will break because of a compiler bug if you use comma operators in peculiar situations. I base this statistical conclusion on just one line of C code that I wrote, that annoyed several C compilers on different flavors of UNIX. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi