https://bz.apache.org/ooo/show_bug.cgi?id=126758

--- Comment #2 from Wolfgang Jäger <[email protected]> ---
Here an additional attemp:

Let me modify the first example of the OP to
=0.5+IF(AND(NOT(CURRENT()>=1);NOT(CURRENT()<>1);CURRENT()=1);1;0)
It will return 1.5 . 
Why? Having evaluated the "NOT(CURRENT()>=1)" on the first parameter position
of AND the result kept in (kind of) the accumulator will be 1 (meaning TRUE).
This is the "current" value still present when the evaluation of the second
parameter is starting. Now this intermediary result is returned by CURRENT. The
second parameter will evaluate to TRUE again for this reason. I cannot judge
whether the CURRENT value passed to the third parameter is now the TRUE
returned for the second one or the TRUE already accumulating two TRUEs under
the rule of AND. This is VERY implementation dependent.

Based on the undocumented utilisation of AND as a logical infix operator we may
also look at
=0.5+IF((CURRENT()<1) AND (CURRENT()=1) AND (CURRENT()=1);1;0) 
to emphasise the similarity of the example to the arithmetic one from my above
comment.

-- 
You are receiving this mail because:
You are the assignee for the issue.

Reply via email to