Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site pucc-i Path: utzoo!watmath!clyde!burl!ulysses!mhuxj!houxm!ihnp4!inuxc!pur-ee!CS-Mordred!Pucc-H:Pucc-I:ags From: ags@pucc-i (Dave Seaman) Newsgroups: net.lang Subject: re: IF KICK-BACK GREATER THAN... Message-ID: <797@pucc-i> Date: Tue, 11-Dec-84 09:48:13 EST Article-I.D.: pucc-i.797 Posted: Tue Dec 11 09:48:13 1984 Date-Received: Thu, 13-Dec-84 05:28:25 EST References: <8900017@uiucdcsb.UUCP>, <223@ic-cs.UUCP> <6805@watdaisy.UUCP> Organization: Purdue University Computing Center Lines: 19 >> In Pascal you can write IF KICK-BACK GREATER THAN 10 AND LESS THAN 100 THEN >> >> as >> IF Kick_back IN [10..100] THEN >> >> or how about >> IF Kick_back IN [10,20,30,40,50] THEN >> if you only want multiples of 10 ? > >True, but it requires an order of magnitude more CPU time than two comparisons. An order of magnitude? Not if it's properly implemented. The indicated condition needs only ONE comparison, plus most likeley a rotation and perhaps an indexing operation. -- [This is my bugkiller line. It may appear to be misplaced, but it works.] Dave Seaman My hovercraft is no longer full of ..!pur-ee!pucc-i:ags eels (thanks to my confused cat).