C syntax (was Re: C sintax)
M. Warner Losh
hydrovax at nmtsun.nmt.edu
Sun Feb 7 16:37:45 AEST 1988
In article <165600034 at uiucdcsb>, wsmith at uiucdcsb.cs.uiuc.edu writes:
> In <548 at gtx.com>, al at gtx.com (Alan Filipski) writes:
> > I'll stick my neck out and say I don't think there ARE any syntactic
> > ambiguities in C.
> > Are there any syntactic ambiguities K&R didn't resolve?
> printf("%0d",a+++b);
> Is this (a++)+b or a+(++b)?
According to K&R it is the former. That is it is (a++)+b, since the tokens
of the language are taken to be the largest possible token. If you didn't
do something like this, then you have all kinds of problems with += and ->.
--
bitnet: losh at nmt.csnet M. Warner Losh
warner at hydrovax.nmt.csnet ! Don't know if this works, let me know.
csnet: warner at hydrovax.nmt.edu
uucp: ...{cmcl2, ihnp4}!lanl!unmvax!nmtsun!warner%hydrovax
More information about the Comp.lang.c
mailing list