Path: utzoo!attcan!uunet!cs.utexas.edu!mailrus!ncar!ico!ism780c!news From: news@ism780c.isc.com (News system) Newsgroups: comp.lang.c Subject: Re: C style peeve and knowing the rules Message-ID: <40658@ism780c.isc.com> Date: 27 Mar 90 03:18:15 GMT References: <2205@osc.COM> <340018@hplvli.HP.COM> <19356@megaron.cs.arizona.edu> Reply-To: marv@ism780.UUCP (Marvin Rubenstein) Organization: Interactive Systems Corp., Santa Monica CA Lines: 16 In article <19356@megaron.cs.arizona.edu> robert@cs.arizona.edu (Robert J. Drabek) writes: >I require my students to use the absolute minimum number of parenthesis >until they have ALL the rules down pat. I would hope you don't fault your students for writing: x = a << (i+j); Here is what Dennis Ritchie says in "The C programming Language, The Bell System Technical Journal, July-August 1978" under the heading "Unfavorable experiences": There are some occasionally suprising operator precedences. For example a >> 4 + 5 shifts right by 9. Marv Rubinstein