C history question
Byron Rakitzis
tbrakitz at phoenix.Princeton.EDU
Wed Sep 13 11:44:16 AEST 1989
In article <1687 at sunset.MATH.UCLA.EDU> pmontgom at 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 at 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 at phoenix.princeton.edu ---- tbrakitz at pucc.bitnet)
More information about the Comp.lang.c
mailing list