openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Weir <robw...@apache.org>
Subject Re: Issue 122927 -- spreadsheet formula compatibility
Date Thu, 15 Aug 2013 13:47:43 GMT
On Thu, Aug 15, 2013 at 9:41 AM, janI <jani@apache.org> wrote:
> On Aug 15, 2013 3:06 PM, "Rob Weir" <robweir@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.

-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-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Mime
View raw message