Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 07/03/2011 03:04 PM, Nuno J. Silva wrote:
On 2011-07-03, Leif Lodahl wrote:

2011/7/3 Andrew Douglas Pitonyak<andrew@pitonyak.org>

StarBasic converts a string representations of a number in a locale
specific way. In other words, in the USA, I expect "12.5" to round to an
integer as 13. In Germany, I expect "12,5" to round to 13. I have a report
of this NOT working on Linux in Germany. I am interested in the results from
  a few different languages, locales, and operating systems. Note that this
works for me with the latest OOo release and the latest LO release candidate
3 on 64-bit Fedora on en-US.

  Dim l As Long
  Dim d As Double
  l = CLng("12.5") : Print l  ' Expect 13 in en-US
  l = CLng("12,5") : Print l
  d = cdbl("12.5") : Print d
  d = cdbl("12,5") : Print d

Based on responses, I will open a bug report
Running the test with Danish (da) locale confirms. The result is 12, 12, 125
and 12. We use ccomma (",") as decimal separator as in German locale.

I'm using Linux with LibreOffice 3.4.1 (OOO340m1 (Build:101)).

I hope this can help.
There is a bug in which cdbl truncates the result if the decimal
separator is not a period. It was discussed here some time ago, see

   http://mid.gmane.org/BANLkTinmR6KNBjzBchS_TwiiHM=CFxHVzw@mail.gmail.com

and the bug report in OOo bugzilla

   http://openoffice.org/bugzilla/show_bug.cgi?id=70236

I don't know if there's already a report in LibO bugzilla.

The referenced bug refers specifically to the case where the language and locale are set from the command line with the statement that it works just fine if the language and locale are set by the system. This problem appears to exhibit itself only on Linux. I was under the impression that it exhibited even on system language and locale at this time.

Yes, all the links and feedback is useful to me.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


--
Unsubscribe instructions: E-mail to users+help@global.libreoffice.org
In case of problems unsubscribing, write to postmaster@documentfoundation.org
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.