Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!orcenl!bengsig From: bengsig@oracle.nl (Bjorn Engsig) Newsgroups: comp.lang.c Subject: Re: C history question Keywords: C design Message-ID: <507.nlhp3@oracle.nl> Date: 18 Sep 89 11:52:19 GMT References: <575@calmasd.Prime.COM> <1687@sunset.MATH.UCLA.EDU> <11046@smoke.BRL.MIL> Reply-To: bengsig@oracle.nl (Bjorn Engsig) Organization: ORACLE Europe, The Netherlands Lines: 17 |In article <1687@sunset.MATH.UCLA.EDU> pmontgom@math.ucla.edu (Peter Montgomery) writes: |>shouldn't we be allowed to abbreviate this to |> allok &&= a[i] > b[i]; Article <11046@smoke.BRL.MIL> by gwyn@brl.arpa (Doug Gwyn) says: |If allok is being used as a Boolean, as it should be in such a context, |you can use &= instead. One less character to type, too. No. I assume that &&= should only evaluate it's right hand if the lefthand is nonzero. | |[Doug continues with other points about boolean (assingment) operators] I agree with these, it would be too much for a very limited use. I would write the above if (allok) allok = a[i] > b[i]; -- Bjorn Engsig, bengsig@oracle.nl, bengsig@oracle.com, mcvax!orcenl!bengsig