0x47e+barney not considered C

William E. Davidsen Jr davidsen at steinmetz.ge.com
Sat Jul 2 01:24:34 AEST 1988


In article <120200001 at hcx2> tom at hcx2.SSD.HARRIS.COM writes:
| 
| I tried posting a comment about this before, but never got any
| responses, so I suspect it became trapped in a maze of twisty little
| passages in our local net without reaching the world at large.
| 
| To get your attention right away, I will point out the following
| true fact:
| 
|       fred = 0x47e+barney ;
| 
| Is NOT a legal Ansii standard C statement. It contains a lexical
| error.

  If the standard really says that this is not legal C the standard is
broken, not the program. The language was changed once to replace
operators like "=*" with "*=" to avoid nonsense like this. I assume that
the standard is poorly stated rather than intended to break existing
programs, but after introducing trigraphs into an *American* standard to
make the language acceptable *elsewhere*, I wouldn't bet on it.

  At the early meetings the committee expressed a desire to "codify
existing practice without egregiously breaking existing programs."
Obviously the desire to be inventive has modified that somewhat.
-- 
	bill davidsen		(wedu at ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me



More information about the Comp.std.c mailing list