Re: [api-dev] CDbl function
Hi Andrew and all, hopefully this thread brings some light into this mysterious problem. I will have another look on this issue the next days. Sevastian `seva` Foglia wrote: ... Perhaps you should add this to the issue so that they can reproduce the problem... I've just done this. Regards Andreas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] CDbl function
Sevastian `seva` Foglia wrote: I found where problem is: environment variable LANG on linux. If LANG is [EMAIL PROTECTED] this macro Sub Main Dim sVal as String sVal = 0,30 print CDbl(sVal) End Sub return 0 If LANG is not set macro return correct value 0,3 Perhaps you should add this to the issue so that they can reproduce the problem... Note: In OOo option Locale is set to Italian (Italy) Although it is a hack, perhaps you can change the , to a ., and then use Val to convert the number rather than CDbl. -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm Free Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] CDbl function
Davide Dozza wrote: Bernard Marcelly wrote: Le 2005-03-03 20:04, Alexej Kryukov a écrit : On Thursday 03 March 2005 20:40, Sevastian `seva` Foglia wrote: Sub Main Dim sVal as String sVal = 0,30 print CDbl(sVal) End Sub I correctly display 0,3 on my OOo 1.1.3 french, Windows XP french On my iBook with NeoOffice 1.1 I get 0,3 On a PC with Window XP professional and OOo 1.1.3 I get 0,3 [...] I have created an issue devoted to this problem long time ago, see http://www.openoffice.org/issues/show_bug.cgi?id=21413 This IZ says it is Linux specific. From what Sevastian sees it exists also on Mac/OsX NeoOffice. No problem with good old Windows. It's what Sevastian said.. CDbl() works well both on Win and NeoOffice but not on Linux. Definitely, it's a Linux issue. Davide I found where problem is: environment variable LANG on linux. If LANG is [EMAIL PROTECTED] this macro Sub Main Dim sVal as String sVal = 0,30 print CDbl(sVal) End Sub return 0 If LANG is not set macro return correct value 0,3 Note: In OOo option Locale is set to Italian (Italy) Bye Seva - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] CDbl function
The one distributed with Fedora heidelberg. I have not set the LANG environment variable however, so I guess it only happens then (I set the locale under ToolsOptionsLanguage Settings). Best Regards Christian Junker Davide Dozza wrote: Christian Junker wrote: Hi Sevastian, I tested your piece of code for OOo 1.1.2 - locale setting german - on Fedora Core 3 and it didn't print 0 but the correct value 0,3. Do you have the vanilla distribution of OOo or the one distributed with Fedora? Davide - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] CDbl function
Hi again cDbl(0.30) --- 0,02 cDbl(0,30) --- 0 0,02 !! where does it come from ? using comma as decimal seprator opn my laptop (be_FR locale, using fr OOo 1.1.4 under debian) print cdbl(0.30) -- 0,3 'print cdbl(0,30) -- error 'print cdbl(0.30) -- error print cdbl(0,30) -- O don't know if it helps Lauren -- Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org Indesko http://www.indesko.com Nuxeo CPS http://www.nuxeo.com - http://www.cps-project.org Livre Programmation OpenOffice.org, Eyrolles 2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]