On Fri, 10 Aug 2001, Rob wrote:

R>My first post on hackers, so please don't flame me too bad :)  I think
R>that only an old hacker can give me the answer :)
R>
R>I've searched far and wide on search engines to find out what the =+
R>operator does, to no avail.  I'm porting some old code and found it.  I
R>made a test program and compiled it with gcc, and all it appears to do
R>is the same as regular assignment.  But I'm wondering if in some day
R>long ago, it mean't something else?  Thanks,  Rob.

Originally the operators like += and -= where written as =+ =-. This
worked at least 'til the UNIX v7 compiler. With v6 or v7 the operators
were changed to get rid of the problem what 'v=-7' means. To assign -7 to
v you had to write 'v= -7'.

So you must have _really_ old code (much of the v7 code was still written
using the old operators).

harti

PS: the v7 compiler also had the undocumented operators \/ and /\ for
min and max. harti.

PPS: if the code is not so old, it may be possible that v=+7 actually
means v= +7. Note, however, that K&R has no unary +. harti
-- 
harti brandt, http://www.fokus.gmd.de/research/cc/cats/employees/hartmut.brandt/private
              [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to