Path: utzoo!utgpu!watmath!att!pacbell!ames!pasteur!ucbvax!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!wuarchive!swbatl!texbell!sugar!ficc!peter From: peter@ficc.uu.net (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: What I'd really like to see in an if-statement... Message-ID: <5565@ficc.uu.net> Date: 7 Aug 89 12:09:11 GMT References: <5024@alvin.mcnc.org> Organization: Xenix Support, FICC Lines: 22 In article <5024@alvin.mcnc.org>, spl@mcnc.org (Steve Lamont) writes: > if ( foo < bar < baz ) > Is there any reason why such a construction is not practical? It complicates the language design for the sake of adding syntactic sugar, but otherwise it's eminently practical. > If not, why has > no language (that I am aware of or can program in) implemented such a > construction? Good idea or bad idea? Well, languages don't implement constructs, but semantic quibbling aside the real-time control language Bob Pearson designed and I implemented at Hydril Control Systems (for a product that was later dropped) had such a construct. It was fairly easy to implement, at least in the Forth-based recursive-descent parser I wrote. -- Peter da Silva, Xenix Support, Ferranti International Controls Corporation. Business: peter@ficc.uu.net, +1 713 274 5180. | "The sentence I am now Personal: peter@sugar.hackercorp.com. `-_-' | writing is the sentence Quote: Have you hugged your wolf today? 'U` | you are now reading"