LibreOffice/OpenOffice.org BASIC – CDbl doesn't work properly with string argument

Johnny Rosenberg <[email protected]> Mon, 6 Jun 2011 22:26:52 +0200
Newsgroups gmane.comp.openoffice.devel.api,gmane.comp.documentfoundation.libreoffice.user
Message-ID <[email protected]>
CDbl returns an integer when the argument is a text string.

LibreOffice 3.4.0
OOO340m1 (Build:12)

OpenOffice.org 3.2.1
OOO320m19 (Build:9505)
ooo-build 3.2.1.4, Ubuntu package 1:3.2.1-7ubuntu1.1

Ubuntu 10.10


REM  *****  BASIC  *****

Option Explicit

Sub Main
	Print CDbl("123.45")
' This gives an error message since my locale is Swedish (Sweden) =E2=86=92
decimal separator=3Dcomma.
End Sub




REM  *****  BASIC  *****

Option Explicit

Sub Main
	Print CDbl("123,45")
' Prints 123, the decimals are gone.
End Sub


Is this a bug?
Are there other ways to convert from text to a numerical value?


Kind regards

Johnny Rosenberg
=E3=82=B8=E3=83=A7=E3=83=8B=E3=83=BC=E3=83=BB=E3=83=AD=E3=83=BC=E3=82=BC=E3=
=83=B3=E3=83=90=E3=83=BC=E3=82=B0
--=20
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help