Boolean Operators Slighted in C

Jim Carter jimc at ucla-cs.ARPA
Sat May 3 09:20:39 AEST 1986


In article <778 at bentley.UUCP> kwh at bentley.UUCP (KW Heuer) writes:
>Btw, you can't have *all* operators extended with "=".  How would you write
>"v = v < e;"?  (Not that it's useful.)
I think it's useful!  As written, of course, it's semantically invalid,
but what you really mean is "v <= e" (sic) or, to demonstrate where it's
really useful,
     array[horrendous] [subscript] [list] <= bigexpr;
  rather than 
     if (array[h][s][l] < bigexpr) array[h][s][l] = bigexpr;
Now "<=" already means something else so this syntax is not acceptable.
How about "v < = e" with a mandatory blank?  This is atrocious human
engineering but at least is parseable.  Anybody have any better ideas?
-- 
James F. Carter            (213) 206-1306
UCLA-SEASnet; 2567 Boelter Hall; 405 Hilgard Ave.; Los Angeles, CA 90024
UUCP:...!{ihnp4,ucbvax,{hao!cepu}}!ucla-cs!jimc  ARPA:jimc at locus.UCLA.EDU



More information about the Comp.lang.c mailing list