You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2022/06/23 15:14:30 UTC
[Issue 128518] New: Basic - Converting "+1" to a number
https://bz.apache.org/ooo/show_bug.cgi?id=128518
Issue ID: 128518
Issue Type: DEFECT
Summary: Basic - Converting "+1" to a number
Product: App Dev
Version: 4.1.12
Hardware: PC
OS: Windows, all
Status: CONFIRMED
Severity: Minor
Priority: P5 (lowest)
Component: scripting
Assignee: issues@openoffice.apache.org
Reporter: czeslaw.wolanski@gmail.com
Target Milestone: ---
Topic "CINT("+1") returns 0" on the English forum
https://forum.openoffice.org/en/forum/viewtopic.php?t=107921
Let's juxtapose relevant functions for the "+1" argument:
---> CInt() and CLng() return 0
---> CDec() returns 1
---> CSng() and CDbl create error message:
"Inadmissible value or data type.
Data type mismatch."
In case of implicit conversion:
dim v as Integer REM Integer | Long | Single | Double
v = "+1"
the result is always 0
Besides isNumeric("+1") returns False
( see Issue 92057 - BASIC-Function isnumeric )
In VBA Excel each of the functions: CInt, CLng, CDec, CSng, CDbl
returns 1. That also happens in Basic in LibreOffice.
OpenOffice either returns an unexpected value or throws an error.
It should return 1.
--
You are receiving this mail because:
You are the assignee for the issue.
[Issue 128518] Basic - Converting "+1" to a number
Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=128518
Czesław Wolański <cz...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |UNCONFIRMED
Ever confirmed|1 |0
--
You are receiving this mail because:
You are the assignee for the issue.
[Issue 128518] Basic - Converting "+1" to a number
Posted by bu...@apache.org.
https://bz.apache.org/ooo/show_bug.cgi?id=128518
Matthias Seidel <ms...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mseidel@apache.org
--
You are receiving this mail because:
You are the assignee for the issue.