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] A-functions


On 9/7/06, Eike Rathke <erack@sun.com> wrote:
> Not exactly. The non-A-versions taking NumberSequences always ignore
> non-inline text, it is not converted to 0 as may be seen with the
> AVERAGE function, while inline-text produces an error. The A-versions
> convert any text to 0, whether inline or non-inline.

Ah, indeed, you are right. Not sure why it seemed to be different previously.

> Also fine. About auto-conversion in general see .sig ;-)

-grin-

> > - COUNT and COUNTA are exceptions, as they just count values - COUNT
> > counts number values and nothing else. COUNTA also counts logical and
> > text values.
>
> So why is that an exception then? It is congruent with the behavior
> above, or did I miss anything?

Because they never attempt conversion of strings to numeric values.
Hence, the COUNTA function would never propagate an error if it were
to get something like "test" - whereas AVERAGEA or something, if using
automatic conversion to numbers, would fail conversion and thus return
an error on the same parameters.

This assumes that the spreadsheet returns an error if a string is used
in number context, but cannot be converted to a number - instead of
being silently converted to 0. That was the outcome of our discussion
regarding auto-conversion, that it would be better this way :)

/ Tomas


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