Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: C associativity rules Keywords: associativity, expressions Message-ID: <8556@smoke.ARPA> Date: 22 Sep 88 00:09:56 GMT References: <412@marob.MASA.COM> <804@proxftl.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 12 In article <804@proxftl.UUCP> francis@proxftl.UUCP (Francis H. Yu) writes: >"a && b" is a control structure which implies > "if (a) if (b) ... " >It has nothing to do with the order of evaluation of expression. That is quite wrong. "&&" is a binary operator", a && b" is an expression, and the subexpression "a" is required to be evaluated. Then, if the value of "a" is nonzero, the expression "b" is required to be evaluated; otherwise "b" is required to NOT be evaluated. The following C statements are legal and useful: c = a && b; d = e + (a && b);