https://bugs.documentfoundation.org/show_bug.cgi?id=111675
--- Comment #21 from Eike Rathke <[email protected]> --- The problem with CURRENT() within IFS() or SWITCH() is that *all* arguments are evaluated before calling the function, it doesn't behave as someone might expect (i.e. executed only if the corresponding jump condition evaluates to TRUE as this is not implemented as jump code branches). Apart from that many assumptions what CURRENT() would do are simply wrong.. If implementation was done with short-cut evaluation jump code branches then an expression like =23+IFS(FALSE();CURRENT()*2;FALSE();CURRENT()*3;TRUE();CURRENT()*4) would yield 115 same as =23+IF(FALSE();CURRENT()*2;IF(FALSE();CURRENT()*3;CURRENT()*4)) does, but currently it yields 27 because for the last condition the CURRENT() has the value 1 of the preceding parameter's TRUE() argument. Doing this with jump code branches would eliminate unnecessary calculations, with the side effect that using STYLE() in conditional branches would actually apply the desired style and not the last encountered during evaluation of arguments. Apart from that using STYLE() is bad style and conditional formatting should be used instead.. -- You are receiving this mail because: You are the assignee for the bug.
