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) →
decimal separator=comma.
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
ジョニー・ローゼンバーグ
--
-----------------------------------------------------------------
To unsubscribe send email to [email protected]
For additional commands send email to [email protected]
with Subject: help