Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!njin!princeton!phoenix!tbrakitz From: tbrakitz@phoenix.Princeton.EDU (Byron Rakitzis) Newsgroups: comp.lang.c Subject: Re: C history question Keywords: C design, XOR Message-ID: <10390@phoenix.Princeton.EDU> Date: 13 Sep 89 01:44:16 GMT Reply-To: tbrakitz@phoenix.Princeton.EDU (Byron Rakitzis) Organization: Princeton University, NJ Lines: 34 In article <1687@sunset.MATH.UCLA.EDU> pmontgom@math.ucla.edu (Peter Montgomery) writes: > I ask why C lacks &&= and ||=. In FORTRAN, I often write code like > ....... > >but it seems in the language spirit to avoid repeating "allok"; >shouldn't we be allowed to abbreviate this to > > allok &&= a[i] > b[i]; >-------- > Peter Montgomery > pmontgom@MATH.UCLA.EDU Why not allok &= (a[i] > b[i]); In this case, the expression on the right will evaluate to either 0 or 1, and you can AND this with the previous value of allok. (line fodder) -- "C Code." "C Code run." "Run, Code, run!" Byron Rakitzis. (tbrakitz@phoenix.princeton.edu ---- tbrakitz@pucc.bitnet)