From owner-freebsd-hackers Fri Aug 10 17:24:26 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from femail38.sdc1.sfba.home.com (femail38.sdc1.sfba.home.com [24.254.60.32]) by hub.freebsd.org (Postfix) with ESMTP id 0EB7A37B406 for ; Fri, 10 Aug 2001 17:24:23 -0700 (PDT) (envelope-from europax@home.com) Received: from home.com ([24.12.186.185]) by femail38.sdc1.sfba.home.com (InterMail vM.4.01.03.20 201-229-121-120-20010223) with ESMTP id <20010811002422.OJTR24947.femail38.sdc1.sfba.home.com@home.com>; Fri, 10 Aug 2001 17:24:22 -0700 Message-ID: <3B747B35.CCA4C6D1@home.com> Date: Fri, 10 Aug 2001 17:24:22 -0700 From: Rob X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-STABLE i386) X-Accept-Language: en MIME-Version: 1.0 To: Mike Smith Cc: "hackers@FreeBSD.ORG" Subject: Re: the =+ operator References: <3B73F0BC.548D40B3@home.com> <3B73F595.CD12F8AA@mitre.org> 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 Mike Smith wrote: > > 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 Thanks Mike, also thanks for everyone elses response. This code is actually pretty new. It part of a bi-gradient conjugate solver for FEM simulators. I compiled the original code with gcc, so I'm assuming it just treated =+ as an =. But just for kicks I also tried +=. In any case I have some other bugs in it that I have to track down since no-matter which way I tried the assignment, my solutions fail to converge :( Rob. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message