Date: Sun, 31 Jan 1999 17:38:12 +0900 From: "Daniel C. Sobral" <dcs@newsguy.com> To: Andrew Kenneth Milton <akm@zeus.theinternet.com.au>, hackers@FreeBSD.ORG Subject: Re: some weird C Message-ID: <36B41674.2E66D8EC@newsguy.com> References: <199901310747.RAA27181@zeus.theinternet.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Andrew Kenneth Milton wrote: > > +----[ Malartre ]--------------------------------------------- > | > | I was expecting 9, not 10. > | since 4+5=9? > > x is pre-incremented, making it 5 *before* the += takes effect. > > This is correct behaviour. Explain the 8 then... if x++ takes effect *after* +=, it should have been 9, right? -- Daniel C. Sobral (8-DCS) dcs@newsguy.com Would you mind not shooting at the thermonuclear weapons? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36B41674.2E66D8EC>