Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site opus.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!hao!cires!nbires!opus!rcd From: rcd@opus.UUCP (Dick Dunn) Newsgroups: net.lang Subject: Re: (COBOL quirk) Message-ID: <952@opus.UUCP> Date: Tue, 13-Nov-84 03:39:44 EST Article-I.D.: opus.952 Posted: Tue Nov 13 03:39:44 1984 Date-Received: Thu, 15-Nov-84 02:02:25 EST References: <440@ima.UUCP> Organization: NBI,Inc, Boulder CO Lines: 20 > PS: How many other languages let you write: > > IF KICK-BACK GREATER THAN 10 AND LESS THAN 100 THEN ... > > without having to mention kick-back twice? They don't design them like they > used to. Probably just as well. Icon does--you would write if (10 < kick_back < 100) . . . Reason: The "<" operator in Icon is left-associative and returns its right operand. Success/failure of an expression is a separate concept from result value. Incidentally, if the first comparison (the "10 < ..." part) fails, the second part ("... < 100") is not performed. (Icon deserves serious study by language designers, etc.) -- Dick Dunn {hao,ucbvax,allegra}!nbires!rcd (303)444-5710 x3086 ...Never attribute to malice what can be adequately explained by stupidity.