From owner-freebsd-hackers Sun Jan 31 02:32:38 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA07829 for freebsd-hackers-outgoing; Sun, 31 Jan 1999 02:32:38 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from peach.ocn.ne.jp (peach.ocn.ne.jp [210.145.254.87]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA07824 for ; Sun, 31 Jan 1999 02:32:36 -0800 (PST) (envelope-from dcs@newsguy.com) Received: from newsguy.com by peach.ocn.ne.jp (8.9.1a/OCN) id TAA28776; Sun, 31 Jan 1999 19:32:15 +0900 (JST) Message-ID: <36B41674.2E66D8EC@newsguy.com> Date: Sun, 31 Jan 1999 17:38:12 +0900 From: "Daniel C. Sobral" X-Mailer: Mozilla 4.5 [en] (Win98; I) X-Accept-Language: pt-BR,ja MIME-Version: 1.0 To: Andrew Kenneth Milton , hackers@FreeBSD.ORG Subject: Re: some weird C References: <199901310747.RAA27181@zeus.theinternet.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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