Apache OpenOffice (AOO) Bugzilla – Issue 109861
N() Function miscalculate, regression
Last modified: 2013-08-07 15:14:47 UTC
put "x" in A1 in A2 =N(A1) , the result is ##VALUE, in 3.1.1 the result is 0 if you say =N("x"), the result is zero
The semantic is changed. See issue 86721, where the old semantic has bee set. Unfortunately ODFF 1.2 does not define it, "5.13.26 N [..] It is implementation-defined what happens if it is provided a Text value." I think OOo should be consistently over the versions. Same kind of error: Write ="123" in A1, result of =N(A1) is 0 in OOo3.1.1 but is number 123 in OOo 3.2.
In Help stanfs for the N function N Returns the numeric value of the given parameter. Returns 0 if parameter is text, FALSE or #NA. If an error occurs, other than #NA, the function returns the error value. Syntax N(Value) Value is the parameter to be converted into a number. N() returns the numeric value if it can. It returns the logical values TRUE and FALSE as 1 and 0 respectively. It returns text and errors as 0. Example =N(123) returns 123 =N(TRUE) returns 1 =N(FALSE) returns 0 =N("abc") returns 0 =N(1/0) returns #DIV/0! either the help is wrong or the implemantation. This is another incompatible change to MS
=SUM(A1) works right
N("string") should yield 0 again, also for Excel interoperability. Taking over.
In cws dr73: changeset ed6958bd4b64 http://hg.services.openoffice.org/cws/dr73/changeset/ed6958bd4b64 M sc/source/core/inc/interpre.hxx M sc/source/core/tool/interpr1.cxx M sc/source/core/tool/interpr4.cxx You can observe the progress and possible integration date of CWS dr73 at http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=DEV300%2Fdr73
ok in DEV300 m74
No, this is not in m74! Please use the original test case, enter text in A1 and in A2 =N(A1)
Setting fixed again.
Reassigning to QA for verification.
verified in internal build cws_dr73
in m76 the error again occurs
=>wope: The cws is not yet integrated in m76. Please wait for m77 (hopefully)
back to verified
I've testet it in m77, the error still occurs
It is fixed in dev300m78. Regards. JBF
ok, it is now fixed. I'll close it
closed
*** Issue 114297 has been marked as a duplicate of this issue. ***