https://issues.apache.org/ooo/show_bug.cgi?id=125743

--- Comment #9 from Jim DeLaHunt <[email protected]> ---
Thanks to Lupp, in the forum thread, for pointing me to
<http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part2.html>, the
"OpenDocument specification", v1.2, Part 2, which is apparently the authority
on how Calc *should* behave. This is the sort of specification for which I was
looking.

My case, with some array values for normally scalar arguments, and a "0"
parameter for "column", seems to be covered by
<http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1017866_715980110>,
section 3.3 "Non-Scalar Evaluation (aka 'Array expressions')", section 2.2.1:

> 2.2.1) Functions returning arrays are not eligible for implicit iteration. 
> When evaluated in 'matrix' mode the {0;0}th element is used.

We can quibble about what section 3.3 says about how Calc should behave, and
how this differs from the way Calc 4.0.1 actually behaves. But the behaviour I
was expecting in this issue was that functions returning arrays would be
eligible for implicit iteration.  The spec isn't giving me that.

In that case, I think the specification for
<http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018424_715980110>,
6.14.6 "INDEX", and the
"https://wiki.openoffice.org/wiki/Documentation/How_Tos/Calc:_INDEX_function]documentation
wiki for INDEX", and the OpenOffice Help for INDEX, are lacking. They should
have some mention that a parameter value of 0 is not permitted in some
circumstances. And, documentation for any other "function returning arrays"
should have a similar mention.

I would like to see a note like: 

> Note: when this function is used in an array formula context, and when one of 
> the [i]row[/i], [i]column[/i], or [i]area[/i] parameters are arrays instead 
> of scalar values, then neither the [i]row[/i] nor the [i]column[/i] parameter 
> is permitted to have the value 0. The function will not return the expected 
> array in this situation. And a similar note should be in the specification 
> and documentation for any other function returning arrays. 

However, that is beyond the scope of this issue.

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

Reply via email to