return expr and if expr - (nf)

jim at ism780.UUCP jim at ism780.UUCP
Wed May 16 14:35:50 AEST 1984


#R:gloria:-16200:ism780:12500007:000:455
ism780!jim    May 14 19:36:00 1984

> "if expr" is impractical.
> "return expr" is unambiguous, but how would you parse
>
>         if x ++ y;

How would you parse if (x) if (y); else z; ?
The general rule is that shift takes precedence over reduce,
so      if x ++ y;  ==>  if (x ++) y;

I am not saying allowing "if expr" is good language design (is the concept
relevant in a discussion about C?), just what I would expect if it were
allowed.

-- Jim Balter, INTERACTIVE Systems (ima!jim)



More information about the Comp.lang.c mailing list