Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!mcnc!ncsu!uvacs!edison!steinmetz!davidsen From: davidsen@steinmetz.UUCP (Davidsen) Newsgroups: net.lang.c Subject: Re: re: what should be added to C Message-ID: <788@steinmetz.UUCP> Date: Thu, 12-Jun-86 14:00:45 EDT Article-I.D.: steinmet.788 Posted: Thu Jun 12 14:00:45 1986 Date-Received: Sun, 15-Jun-86 02:23:37 EDT References: <5565@alice.UUCP> <8200005@ztivax.UUCP> <1006@umd5.UUCP> Reply-To: davidsen@kbsvax.UUCP (Davidsen) Organization: GE CRD, Schenectady, NY Lines: 34 In article <1006@umd5.UUCP> zben@umd5.UUCP (Ben Cranston) writes: >In article <8200005@ztivax.UUCP> david@ztivax.UUCP writes: >> (condensed to "don't make := assignment") > >Clearly "=" should remain the assignment operator. We should replace all >testing with the extended syntax: > >... > switch (a:b) { > case <: isgreater; break; > case =: isequal; break; > case >: isless; break; > default: yell("this cannot happen!\n"); > } >... > I really like this! I don't propose that we use it, but I like it! It reminds me that the only thing I miss in FORTRAN is the arithmetic IF, when I write certain types of quick and dirty comparisons. Perhaps we could also take inspiration from the ? triadic operator and use '$' for a quadradic operator, return different values for <, =, >. i.e. n = (a$b : less() : equal() : greater()); I don't think I'm serious... -- -bill davidsen ihnp4!seismo!rochester!steinmetz!--\ \ unirot ------------->---> crdos1!davidsen chinet ------/ sixhub ---------------------/ (davidsen@ge-crd.ARPA) "Stupidity, like virtue, is its own reward"