[Libreoffice-bugs] [Bug 111675] UI: Functions IFS does not work together with function CURRENT

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Mar 9 21:31:29 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=111675

Eike Rathke <erack at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |NOTABUG

--- Comment #8 from Eike Rathke <erack at redhat.com> ---
Well, what do you expect? CURRENT() returns the current internal value at the
position of the evaluation chain where it occurs. When used multiple times
within  arguments to the same function the result depends on the order of
evaluation. IFS() evaluates conditions until it finds a matching one,
sprinkling CURRENT() all over makes it depend on internal behaviour what
arguments will be evaluated first, which currently may be all before IFS() is
called and in future may be only the ones until one is matched.

CURRENT()>2,CURRENT()&">2"
depends on whether the parameters are evaluated from left to right (usual but
not necessarily) or from right to left. If from left to right then the second
CURRENT() returns the result of the comparison CURRENT()>2, whatever CURRENT()
might had been there, so 0 or 1.

Also this
="before"&IFS(0=0,CURRENT()&"z", […]
="before"&IFS(0=0,"z"&CURRENT(), […]
is logical behaviour. In the first example CURRENT() returns the result of the
condition 0=0, which is 1. In the second example it returns the "z" that was
just pushed as operand for the & operator.

Using CURRENT() multiple times at the same function level within one expression
means relying on internal implementation details. One should not. It may change
without notice.

=ISNA(CURRENT()) returns FALSE because CURRENT() as first to be evaluated
function does not return NA(), it's Err:518, =ISERROR(CURRENT()) returns TRUE.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180309/48812398/attachment.html>


More information about the Libreoffice-bugs mailing list