From owner-freebsd-hackers Fri Aug 10 7:50:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpproxy1.mitre.org (mb-20-100.mitre.org [129.83.20.100]) by hub.freebsd.org (Postfix) with ESMTP id EBE7437B405 for ; Fri, 10 Aug 2001 07:50:47 -0700 (PDT) (envelope-from mlsmith@mitre.org) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.11.3/8.11.3) with ESMTP id f7AEogD25350; Fri, 10 Aug 2001 10:50:42 -0400 (EDT) Received: from MAILHUB1 (mailhub1.mitre.org [129.83.20.31]) by smtpsrv1.mitre.org (8.11.3/8.11.3) with ESMTP id f7AEofX29772; Fri, 10 Aug 2001 10:50:41 -0400 (EDT) Received: from dhcp-48-37.mitre.org (128.29.48.37) by mailhub1.mitre.org with SMTP id 7298422; Fri, 10 Aug 2001 10:49:50 -0400 Message-ID: <3B73F595.CD12F8AA@mitre.org> Date: Fri, 10 Aug 2001 10:54:13 -0400 From: Mike Smith Organization: The MITRE Corporation X-Mailer: Mozilla 4.76 [en]C-20010313M (Win95; U) X-Accept-Language: en MIME-Version: 1.0 To: Rob Cc: "hackers@FreeBSD.ORG" Subject: Re: the =+ operator References: <3B73F0BC.548D40B3@home.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've been doing this for a long time and today this would be taken as two operators. The assignment and unary +. Since A = B is the same as A = +B, it would perform the same as a simple assignment. The only reason I can see to do this legitimately is for clarity reasons, i.e., if what follows the "+" is almost always used as a negative but this use is an exception. But more likely, at some point there was something between the = and + at one point that got deleted, but the "+" was left. Since this is "the default", there would be no coding or operational errors from leaving it in. Then again, it could have been intended to be += and you've found a heretofore undiscovered bug! All you have to do is press Shift at the wrong time (not that I've ever done that). Mike Smith (but not "THE" Mike Smith) Rob wrote: > > My first post on hackers, so please don't flame me too bad :) I think > that only an old hacker can give me the answer :) > > I've searched far and wide on search engines to find out what the =+ > operator does, to no avail. I'm porting some old code and found it. I > made a test program and compiled it with gcc, and all it appears to do > is the same as regular assignment. But I'm wondering if in some day > long ago, it mean't something else? Thanks, Rob. > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message