Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!ames!nrl-cmf!ukma!gatech!udel!rochester!rutgers!im4u!ut-sally!utah-cs!utah-gr!uplherc!esunix!rushfort From: rushfort@esunix.UUCP (Kevin Rushforth) Newsgroups: comp.lang.c Subject: Re: Autoincrement question (ignore my previous posting) Message-ID: <619X@esunix.UUCP> Date: 21 Jan 88 00:00:00 GMT References: <618@esunix.UUCP> Organization: Evans & Sutherland, Salt Lake City, Utah Lines: 29 in article <618@esunix.UUCP>, rushfort@esunix.UUCP (Kevin Rushforth) says: > in article <548@tuvie>, rcvie@tuvie (ELIN Forsch.z.) says: >> If there is any necessity to have the whole semantic in one *expression*, use >> the comma operator, as >> >> bar->tmp = bar, bar++; >> >> This operator *guarantees* the sequential evaluation of its operands from >> left to right. > > Not quite. While it is true that bar will be evaluated before bar++, > it is bar++, not bar, that will be assigned to bar->tmp. Oops. When I wrote the above nonsense, I had incorectly parsed the expression as: bar->tmp = (bar, bar++); /* This won't work */ Instead of: bar->tmp = bar, bar++; /* This will work fine */ Well, since it is obviously past my bedtime, I will shut-up now. -- Kevin C. Rushforth Evans & Sutherland Computer Corporation UUCP Address: {ihnp4,ucbvax,decvax,allegra}!decwrl!esunix!rushfort Alternate: {bellcore,cbosgd,ulysses}!utah-cs!esunix!rushfort