Hi, On Sat, 23 May 2026, 08:00 Benjamin Urban, <[email protected]> wrote:
> Re: https://gerrit.libreoffice.org/c/core/+/205448 Implemented callables > in formulas, and functions that interact with them > > In continuing to wade through errors that Jenkins throws up, I found one > that I think should be brought to someone's attention. It's saying that > CppunitTest_sc_datetime_functions_test failed. It fails locally, too, and > when I investigated, I found out why. Apparently, that document has ranges > named "year", "month", and "day", and refers to them as such in its > formulas. But, in order to implement eta-lambda, I am allowing the user to > refer to the functions YEAR, MONTH, and DAY by name, without calling them. > This (currently) overrides the named range. > > Two solutions come to mind: I could have it check for names before > operators, which would mean that all names override all operators within > the scope of the name (which would render some operators inaccessible in > some contexts, and could confuse the user), or I could make the names > case-sensitive. In the latter case, it could still fall back to the > operator if a name is not defined that matches exactly, but that would > allow those names (and all the others; N and T come to mind) to be used for > formulas, as long as they are not entirely upper-case. I can do this, but > it is an extensive change, so I thought I'd run it by this list first. > > Any thoughts? > I was playing around and "=LAMBDA(SQRT, SQRT(SQRT))(4)" Excel resolves that and returns the result "2". So it seems the input parameter takes precedence (irregardless of case) unless it's called - then it assumes it's a built-in function. You'll probably have to match that. BTW. I have written some tests in [1] for LAMBDA - should be useful. [1] https://gerrit.collaboraoffice.com/c/online/+/3178 > Ben > > P.S. I think I read online somewhere that Excel takes the latter approach. > Tomaž
