On 15 August 2013 14:47, Rob Weir <robw...@apache.org> wrote: > On Thu, Aug 15, 2013 at 9:41 AM, janI <j...@apache.org> wrote: >> On Aug 15, 2013 3:06 PM, "Rob Weir" <robw...@apache.org> wrote: >>> >>> https://issues.apache.org/ooo/show_bug.cgi?id=122927 >>> >>> It boils down to how an IF() statements are evaluated. >>> >>> Remember, the typical form is IF(Condition;X;Y) where you give a >>> return value for the case where Condition is TRUE and another value >>> when Condition is FALSE. >>> >>> But it is also possible to leave out the last parameter and have a >>> formula like this: >>> >>> IF(Condition;X) >>> >>> So what does the formula evaluate to if Condition is FALSE? >>> >>> The behavior in 4.0.0, returning FALSE, is correct according to the >>> ODF 1.2 specification and is the same as what Excel does. However, it >>> is different than what earlier versions of OpenOffice did, namely >>> returning 0.0. >>> >>> We obviously cannot do both. I think the AOO 4.0.0 behavior is >>> correct and should remain. >> >> I dont understand why we cannot do both, most programming languages >> interpret falase==0 and true==1, that allows the use of boolean functions >> in calculations. >> > > If the user takes the results of the IF() calculation and uses it in > another formula, then FALSE is automatically treated as 0 in any other > formula where a number is expected. You are correct in your > assumption there. So no one gets a wrong answer in a calculation > because of the change. > > What is different is what appears in the cell that actually has the > IF() statement in it. AOO 4.0 and Excel show FALSE. Earlier versions > of AOO showed 0. In this sense we can have one default behavior or > the other, but not both.
Could you not add a setting that controls the behaviour? For a fresh install AOO 4.x will show FALSE. But if the user sets the appropriate backwards compatibilty option, it will show 0. > -Rob > > >> rgds >> jan i >>> >>> I'd like to close the issue as NOTABUG. But I'd like to get a few >>> more thoughts on this first. >>> >>> Regards, >>> >>> -Rob >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org >>> For additional commands, e-mail: dev-h...@openoffice.apache.org >>> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org > For additional commands, e-mail: dev-h...@openoffice.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org For additional commands, e-mail: dev-h...@openoffice.apache.org