Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!mcnc!spl From: spl@mcnc.org (Steve Lamont) Newsgroups: comp.lang.c Subject: Re: What I'd really like to see in an if-statement... Message-ID: <5027@alvin.mcnc.org> Date: 5 Aug 89 22:01:59 GMT References: <5024@alvin.mcnc.org> <1300@atanasoff.cs.iastate.edu> Reply-To: spl@mcnc.org.UUCP (Steve Lamont) Organization: Microelectronics Center of NC; RTP, NC Lines: 24 In article <1300@atanasoff.cs.iastate.edu> hascall@atanasoff.cs.iastate.edu.UUCP (John Hascall) writes: @In article <5024@alvin.mcnc.org> spl@mcnc.org.UUCP (Steve Lamont) writes: @}sort of another I often find myself wishing for an if construct that looks @}like @ @} if ( foo < bar < baz ) ... @ @}Is there any reason why such a construction is not 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? @ @ @ It's in COBOL (along with everything else). @ @ To answer your other question, COBOL is a bad idea. That really doesn't address the question: is the mathematical inequality test shown in my example a *bad* idea? -- spl Steve Lamont, sciViGuy EMail: spl@ncsc.org North Carolina Supercomputing Center Phone: (919) 248-1120 Box 12732/RTP, NC 27709