Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: parens honored Message-ID: <1808@bsu-cs.UUCP> Date: 8 Jan 88 21:43:19 GMT References: <6829@brl-smoke.ARPA> <2845@zeus.TEK.COM> <6860@brl-smoke.ARPA> <12211@orchid.waterloo.edu> <6968@brl-smoke.ARPA> <1798@bsu-cs.UUCP> <6986@brl-smoke.ARPA> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 18 Keywords: ANSI C standard In article <6986@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) writes: >In article <1798@bsu-cs.UUCP> dhesi@bsu-cs.UUCP (Rahul Dhesi) writes: >>Isn't it true though that in pre-ANSI K&R C, one could force a certain >>order of evaluation through the use of temporary variables, thus >>getting the best of both worlds? ANSI C takes away this ability from >>the user. > >How so? I don't think this has changed one whit. Pre-ANSI K&R C allowed the user to pretty much use parentheses anywhere without inhibiting optimization. Yet, when necessary, the user could force a specific evaluation order. ANSI C preserves only the second option--the user can no longer (on a machine that checks for overflow) use parens with wild abandon. It is this ability to get "the best of both worlds" that ANSI C takes away. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi