# to the nth power

Blair P. Houghton bhoughto at cmdnfs.intel.com
Thu Nov 8 10:23:17 AEST 1990


In article <8149 at star.cs.vu.nl> engbert at cs.vu.nl (Engbert Gerrit IJff) writes:
>In article <P1X6QN1 at xds13.ferranti.com>,
>	peter at ficc.ferranti.com (Peter da Silva) writes:
>) In article <226 at smds.UUCP> rh at smds.UUCP (Richard Harter) writes:
>) > 	for (y=x,sqrtx=1;y>0;) {ysave = y;y =/ 16;sqrtx =* 4;}
>) 
>) This man has been programming in C for a *long* time. I'm impressed.
>) (quiz: why do I come to this conclusion?)
>
>That is an easy quiz. Look at the =/ and =* operators.

It's not an easy quiz (though your answer is correct);
it's an inside joke.

The reason Peter comes to any (discernible) conclusion is
so that he can see his (discernible) name in (phosphorescent) lights.

:-)

Ob. C:

Now that the cat's out of the bag, I'd like to point out to
the newer C programmers that the assignment operators we
know as '+=' et al did used to be usable as '=+' et al.
However, it was very long ago[*] that this was changed, and
now only the '+=' forms are considered correct.  You may
(unsettingly often) find a compiler that will accept the
obsolete form (properly flagging it with a warning that
you're being a crufty old coot :), but ANSI forbids it, and
most compilers will call it an error.  The reason given
most often is that it can confuse such expressions as
`x=-y'; is it `x =- y' or `x = -y'?  Under maximal-munch[**]
it's the former.  Under the rules of precedence it's the
latter.

[*] "...three days after Marconi invented the f*cking thing."
-the great Warren Oates in 'Blue Thunder'
[**] Maximal munch:  if the next n characters are a valid token,
and the next n+m characters are also a valid token, consider
the longer one to be the token.  (Hey, I _did_ say this was
for the new guys.)

				--Blair
				  "Prior art includes Picasso,
				   Michelangelo, _and_ Renoir.
				   Why choose?"



More information about the Comp.lang.c mailing list