programming puzzle (silly)
Tom Stockfisch
tps at chem.ucsd.edu
Wed Mar 15 11:01:01 AEST 1989
In article <218 at umigw.MIAMI.EDU> steve at umigw.miami.edu (steve emmerson) writes:
>[argument that "n&&m*=n--" is not equivalent to (n&&m) *= n-- and thus
>not illegal, because: ]
>Precedence rules are needed only when there is more than one way to
>generate a given expression and (consequently) more than one way to parse
>it. They appear to be unnecessary for the above expression.
This idea seems to me to admit too many wierd constructs. For instance, why
couldn't you argue that the following expressions are legal?
EXPRESSION EQUIVALENT TO
a + 1[0] (a + 1)[0]
a + b = c a + (b = c)
*a + 5 = 0 *(a + 5) = 0
--
|| Tom Stockfisch, UCSD Chemistry tps at chem.ucsd.edu
More information about the Comp.lang.c
mailing list