Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Aug 2001 10:54:13 -0400
From:      Mike Smith <mlsmith@mitre.org>
To:        Rob <europax@home.com>
Cc:        "hackers@FreeBSD.ORG" <hackers@freebsd.org>
Subject:   Re: the =+ operator
Message-ID:  <3B73F595.CD12F8AA@mitre.org>
References:  <3B73F0BC.548D40B3@home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B73F595.CD12F8AA>