https://bugs.documentfoundation.org/show_bug.cgi?id=93193
Bug ID: 93193
Summary: Info function IsNumeric(Var) does not accept a leading
sign in the exponent part of a number passed to it as
a string.
Product: LibreOffice
Version: 4.1.5.3 release
Hardware: Other
OS: All
Status: UNCONFIRMED
Severity: critical
Priority: medium
Component: BASIC
Assignee: [email protected]
Reporter: [email protected]
IsNumeric("1.234E+1") does return false.
Expected: true
For comparison: Val("1.234E+1") will return a number equivalent to 12.34 as
expected.
How to reproduce:
1. Create a new spreadsheet document.
2. Create a BASIC module 'Module1' in the 'Standard' container of the document.
3. Enter into the module the Subroutine:
Sub TestIsNum
TestStr = "1.234E+1"
Test = IsNumeric(TestStr)
TestVal = Val(TestStr)
Print TestVal
End Sub
4. Create watches for 'TestStr', 'Test', 'TestVal'.
5. Execute the Sub stepwise.
6. Observe the watches and the output.
7. Test additional strings.
Versions
The bug was not present in old vesrsions 3.3.4 and 3.6.5 tested by me.
(AOO 4.1.1 is also not afflicted.)
The bug showed up in these tested versions: 4.1.5, 5.0.0.
I also tested some versions between to the same result.
Severity
I started to add a lot of missing functions to the pile for complex math. For
cooperation with standard functions from the add-in group I need some
additional conversion and parsing. I got completely stuck with the project and
lost hours trying to make sure my results are reliable with the halp of
IsNumeric(Var) because the Val(Var) function never reports an error. It's a
mess! Now I see that IsNumeric also is just kidding.
These functions are fundamental! Standard functions must be reliable!
Important remark: Val("1,234E+1") will also accept the input but return the
wrong result 12340. I will file a bug report about this as soon as I find the
time. It is not acceptable that the function not even returns its silly 0 on
bad input, but simply produces a result out of imagination.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs