Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!mikros!mwtech!martin From: martin@mwtech.UUCP (Martin Weitzel) Newsgroups: comp.lang.misc Subject: Easy to read conditions (was Re: do...while vs. repeat...until) Message-ID: <690@mwtech.UUCP> Date: 22 Mar 90 19:08:43 GMT References: <16188@haddock.ima.isc.com> <9130009@hpavla.AVO.HP.COM> <16249@haddock.ima.isc.com> Reply-To: martin@mwtech.UUCP (Martin Weitzel) Organization: MIKROS Systemware, Darmstadt/W-Germany Lines: 14 In article <16249@haddock.ima.isc.com> karl@haddock.ima.isc.com (Karl Heuer) writes: >[.....] I claim that, to me, the condition "(c >= 'a' && c <= 'z')" is a >simpler expression than "(c < 'a' || c > 'z')". I immediately recognize the >idiom in the former, but the latter causes a perceptible delay as I mentally >translate the condition. Why not "('a' <= c && c <= 'z')" ? This duplicates the mathematical notation "lowest <= x <= highest" to specify a range very closely. It's equally easy to ready if you want to exclude one of the limits from the range - simply change "<=" to "<". -- Martin Weitzel, email: martin@mwtech.UUCP, voice: 49-(0)6151-6 56 83