OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office-formula message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office-formula] NUMBERVALUE


As I was pointed out by an implementor we do have a defect in the
current draft regarding the definition of the NUMBERVALUE function.

On Monday, 2007-04-02 14:20:13 +0200, Eike Rathke wrote:

> Any opinions on NUMBERVALUE regarding the points I mentioned:
> - Introduction of a third parameter for group AKA thousand separator.
>   Strictly spoken, for a group separator we'd also need a fourth
>   parameter to define the grouping, defaulted to "3" (for Western
>   1,000,000), which could be set to "23" (for Indic 1,00,00,000).
> - Do not define it as yet another "try to parse as much as possible"
>   function, hence no fallback to VALUE with exchanged separators. Parse
>   only numbers, do not try to attempt parsing dates/times/currencies/...

See also
for a lengthier mail regarding that topic.

I propose to:

- Remove any reference to date/time/currency and adapt the regular
  expression, respectively remove it if someone doesn't have a swift
  idea to express the following:

- If some non-digit character other than leading space characters or one
  leading sign character or trailing spaces is present, an error is
  generated. Except if given separator information as follows:

- Make the second parameter (decimal separator) optional. If not given,
  only integer numbers are parsed.

- Define a third optional parameter for the group separator. If not
  given, only integer and decimal (if the second parameter is present)
  numbers are parsed.

- An optional fourth parameter specifying grouping, defaulted to "3".
  Interpreted from right to left for possible grouping characteristics,
  for example "23" for Indic 1,00,00,000

Resulting in a syntax of:

NUMBERVALUE( Text T [ ; Text DecimalSeparator [ ; Text GroupSeparator [ ; Text Grouping ]]] )



Automatic string conversions considered dangerous. They are the GOTO statements
of spreadsheets.  --Robert Weir on the OpenDocument formula subcommittee's list.

PGP signature

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]