Xref: utzoo alt.folklore.urban:16519 comp.lang.c:40428 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!uwm.edu!ux1.cso.uiuc.edu!usenet From: vulcan@uiuc.edu (EvilTwin) Newsgroups: alt.folklore.urban,comp.lang.c Subject: Re: Heroic failures (q = q++) Summary: q = q++ Message-ID: <1991Jun25.151408.1024@ux1.cso.uiuc.edu> Date: 21 Jun 91 13:20:43 GMT References: <902@adimail.UUCP> <7079@gara.une.oz.au> <15520@exodus.Eng.Sun.COM> Sender: usenet@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 25 In article <902@adimail.UUCP> tel@adimail.UUCP (Terry Monks) writes: >(Peter van der Linden (linden@adapt.Eng.sun.com)) scripsit: >> >> q = q++; >> > >This strange statement does exactly what I expected it to do - it assigns to >q the value of q incremented - i.e. is the same as just q++. I actually compiled >it to make sure. > > >Terry "" Monks > The above has been shameless edited of all (most?) simmerage. A co-worker and I tried the above on our respective machines. He on an IBM 70/386 using Borland C++, I on a MicroVAX II using DEC's C version 3.1. He received a result of 6, I one of 5. Why is this? Does your chewing gum lose it's flavor on the bedpost overnight? Evil "Bring on the Terry's" Twin - ps - the initial value of q was 5.