Page 1 of 1

'Function' separator, parameter list, inline arrays

PostPosted: Tue Mar 24, 2020 1:40 pm
by Lupp
Just a reminder: A long time ago now LibreOffice changed its behavior with respect to default separators used in function calls (and for inline arrays).

(Here a post of mine to a different thread was linked. That thread was meanwile marked unclean due to the posts by another user there. I therefore removed the link and will post the content I had linked to below. Sorry.)

Re: 'Function' separator, parameter list, inline arrays

PostPosted: Tue Mar 24, 2020 4:57 pm
by Lupp
In a different thread errors caused by substituded separators were discussed. There user "John_Ha" had posted the comment quoted below to which I want to refer here since I assume specifically questioners coming to this LibreOffice subforum might be afflicted by the situation..

John_Ha wrote:AOO uses semi-colons as parameter separators.
LO uses commas and converts typed semi-colons to commas.
AOO and LO are diverging quite rapidly.

The second line is not quite correct.

LibreOffice made the default parameter separator depending on the locale a while ago: For locales using the point as their decimal separator, the comma is put in the role of the parameter separator. They obviously did it to be "better compatible with Excel" where still many users not fond of thinking much get their suggested formulas from. Informed users change the comma then to semicolon again via option settings.

(Less urgent:)
The separators used for inline constant arrays are a related topic. ('5.13 Inline Arrays' of OASIS documents OpenDocument-v1.2-part2 and OpenDocument-v1.3-cs01-part4-formula as well give the separators used when writing to the file. Original state was consistend and made the same characters mandatory for the UI. Silly localization messed it up.) In this case, however, the situation is worse: The pair of ";" and "|" is replaced by "," and ";" depening on the locale by default. Since the semicolon is used in both versions, but in different roles, this spoils everything, and makes impossible an easy way to re-enable global exchange. (Therefore I didn't include this part with my posts linked below. Inline arrays are rarely mentioned in related questions anyway.)

See this Q&A thread for more details: https://ask.libreoffice.org/en/question/131311/.

Re: 'Function' separator, parameter list, inline arrays

PostPosted: Tue Mar 24, 2020 5:43 pm
by John_Ha
Lupp wrote:
John_Ha wrote:AOO uses semi-colons as parameter separators.
LO uses commas and converts typed semi-colons to commas.
AOO and LO are diverging quite rapidly.

The second line is not quite correct.

... but it is correct using a default LO installation in my UK Locale. As you say, though, it is not necessarily correct in other locales.

Re: 'Function' separator, parameter list, inline arrays

PostPosted: Tue Mar 24, 2020 8:04 pm
by Lupp
John_Ha wrote:... but it is correct using a default LO installation in my UK Locale. As you say, though, it is not necessarily correct in other locales.

I described this thoroughly to any relevant detail in the Q&A on ask.libreoffice.org I linked to in my first post here.
However, the generalized statement I quoted you with was not correct on the level I wanted to be regarded here.

Narrowing it to the default installation with any UK locale is too narrow then. The issue is coming up with the default settings of any locale using the point as its decimal separator - and it is cured once and for all by changing the relevant setting as I described. The much better(imo) traditional setting is saved to the user profile and will persist when updates are installed.

Re: 'Function' separator, parameter list, inline arrays

PostPosted: Tue Mar 24, 2020 8:33 pm
by John_Ha
Thanks for the clarification!

Re: 'Function' separator, parameter list, inline arrays

PostPosted: Tue Mar 24, 2020 10:14 pm
by Lupp
Thanks in return!
And, you are rightfully concerned about diverging versions.
In this case it's not only LibO vs AOO, but also an increasing inconsistency seizing the range of versions and locales of LibO.

I will always argue against this tendency, and therefore want to affirm my statement made in the linked Q&R thread:
Localization beyond the absolutely necessary is a way to hell...
In the given case the alleged reason for the different treatment of locales surely was to get "better compatible" with MS Excel which had the "wrong" or "bad" defaults in their DSIP (DecimalSeparatorIsPoint) versions. Even MS, of course, should know that the majority of locales worldwide are DSIC ("Comma"). For MS, however, incompatibility and confusion may be means of commercial success. A community like LibreOffice - foundation, developers, users, supporters - constitutes one must be interested in global cooperation. We may be many, but we cannot grant support for 200+ locales differing under relevant aspects.