Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!bfmny0!tneff From: tneff@bfmny0.UUCP (Tom Neff) Newsgroups: comp.lang.c Subject: Re: What I'd really like to see in an if-statement... Message-ID: <14521@bfmny0.UUCP> Date: 6 Aug 89 16:42:36 GMT References: <5024@alvin.mcnc.org> <1300@atanasoff.cs.iastate.edu> <456@helios.prosys.se> Reply-To: tneff@bfmny0.UUCP (Tom Neff) Organization: ^ Lines: 18 The complex expression val1 < x < val2 (and by extension, the 24 other forms possible with <, <=, ==, >= and >) really has nothing to do with the 'if' statement, so the subject name of this thread is inaccurate. What's wished for is a triadic comparison operator, which could then be used in any of the boolean contexts that a simple binary comparison can be used now. It would be fun to have such a thing, it would make expressing lots of conditions more concise and everyone would use it. However it would break a lot of things in "C" (the expression above IS VALID C right now, for instance, with a totally different meaning) and parsing would be a nightmare. I wouldn't hold my breath. -- "We walked on the moon -- (( Tom Neff you be polite" )) tneff@bfmny0.UU.NET