Article View: comp.lang.misc
Article #506Re: What I'd really like to see in an if-statement...
From: Dave Berry
Date: Tue, 15 Aug 1989 11:13
Date: Tue, 15 Aug 1989 11:13
24 lines
1614 bytes
1614 bytes
In article <1989Aug14.022903.22953@agate.berkeley.edu> mwm@eris.berkeley.edu (Mike Meyer) writes:
>
>The Icon group find a slightly cleaner way to do this. Instead of
>expression evalutaing to booleans, they either produce a value, or
>"fail". Any expressions including a failed expression also fail, except
>for "not" (which is classed as a control structure).
>
>Likewise for:
>
> if a < b <= c = d < e then
What about (a < b) = (d < e), i.e. comparing results of relational
operations? Presumably this is equivalent to
if a < b and d < e then b = e [else fail]
and not to the expected result from boolean logic. Or does bracketing
a relational expression force it to produce a canonical truth value (ugh) ?
Dave Berry, Laboratory for Foundations db%lfcs.ed.ac.uk@nsfnet-relay.ac.uk
of Computer Science, Edinburgh Uni. <Atlantic Ocean>!mcvax!ukc!lfcs!db
Rhetoric 101: Use of "scare" quotes and the phrase "so-called".
Technical Details
Message-ID:
<126@castle.ed.ac.uk>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcvax!ukc!edcastle!lfcs!dbReferences:
<8577@batcomputer.tn.cornell.edu> <14251@haddock.ima.isc.com> <516@brazos.Rice.edu> <14278@haddock.ima.isc.com> <1989Aug14.022903.22953@agate.berkeley.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!mcvax!ukc!edcastle!lfcs!db From: db@lfcs.ed.ac.uk (Dave Berry) Newsgroups: comp.lang.misc Subject: Re: What I'd really like to see in an if-statement... Message-ID: <126@castle.ed.ac.uk> Date: 15 Aug 89 11:13:32 GMT References: <8577@batcomputer.tn.cornell.edu> <14251@haddock.ima.isc.com> <516@brazos.Rice.edu> <14278@haddock.ima.isc.com> <1989Aug14.022903.22953@agate.berkeley.edu> Sender: root@castle.ed.ac.uk Reply-To: db@lfcs.ed.ac.uk (Dave Berry) Organization: Laboratory for the Foundations of Computer Science, Edinburgh U Lines: 24