$)CHarald van D)&k said:
Right, and as a result, x=&a is valid C89 and C99, takes the address of
a, and assigns that pointer value to x. If =& were still a single
operator, it would be equally valid, but with a completely different
meaning.
On the other hand, many years ago, I ran into a compiler which took:
mychar=*ptr;
to mean the same as
mychar *= ptr;
Fortunately, this generated an error, as it tried to multiply by a
pointer.
On a related note (sort of), then there's the case of dividing by a
dereferenced pointer:
foo = bar/*ptr;
I learned early on to use spaces around operators, and now I find it
easier to read like that, anyway.
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody |
www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net |
www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:
[email protected]>