Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.csd.uwm.edu!uakari.primate.wisc.edu!indri!polyslo!usc!orion.cf.uci.edu!uci-ics!ankle From: ankle@ics.uci.edu (Rod Shankle) Newsgroups: comp.lang.eiffel Subject: Re: a < b < c Summary: Functions are functions Message-ID: <1989Aug31.191822.20895@paris.ics.uci.edu> Date: 31 Aug 89 19:18:22 GMT References: <239@enea.se> <16213@watdragon.waterloo.edu> Sender: Stefan HM Ludwig Reply-To: Rod Shankle Organization: University of California, Irvine - Dept of ICS Lines: 13 > should a < b < f () be allowed and if a >= b should the function be > called or not ?? Well, since f () is a function and functions shouldn't have any side effects (refer to OOSC for a lot of examples and reasons why they shouldn't) it doesn't matter (unless your profiling the program) if f () gets called or not. With that restriction even an expression such as a < f () < c should be allowed. BTW, most compilers evaluate IF a < b AND b < c THEN as IF a >= b THEN FALSE ELSE b < c --- SHML ---