Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


This time to the ML as well...



Winfried


-----Oorspronkelijk bericht-----
Van: Winfried Donkers
Verzonden: donderdag 6 december 2012 12:52
Aan: 'erack@redhat.com'
Onderwerp: RE: Change in core[master]: fdo#56124 add calc functions
IFERROR and IFNA as in ODFF1.2

Hi Eike,

Van: Eike Rathke (via Code Review) wrote: donderdag 22 november 2012
23:31

I suggest you take a look at the implementation of ocIf and use a
similar approach with only one conditional path instead of two, for
which the condition is calculated from the expression's result whether
it is an error or not and then a jump is executed or not. There is
some special code in the compiler to calculate jump paths (lookout for
ocIf), and handling is different from normal functions in the
interpreter. Feel free to ask for details and pointers on the mailing list.

I agree that my submitted patch is inefficient when it always calculates both
arguments.
The simple examples of the function disfunctioning (I tested lots of
arguments, but never tried direct calculations as an argument) could be
remedied, but it would stay an inefficient function (sometimes even less
efficient than IF(X;X;Y)).

So I followed your suggestion to work along the lines of ScIfJump/ocIf.
These last 2 weeks I have not been able to get that working properly.
To finally find out what goes wrong, I copied the contents of SCIfJump() into
ScIfError(), made ocIfError do the same as ocIf (except in lotus/excel filter
files) and gave IFERROR() 3 arguments (just as IF()).
It still doesn't work: IFERROR(X;Y;Z) always returns Y, regardless of the value
of X. That is, if X produces an error (or Y, or Z), the error is returned.

What am I missing/messing up?
I can upload the diff file to the bug, but possibly you can give some pointers
without them.

Winfried

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.