Hy all!
I have a problem with CDbl function.
On my IBook (with NeoOffice) CDbl applied to a string value, <0,30>,
return the correct result, <0,30>.
On my i386 (with OpenOffice.org 1.1.4) the same function applied to same
value return a wrong result, <0>.
Why?
Thanks, Seva
--
Hi,
I have a problem with CDbl function.
On my IBook (with NeoOffice) CDbl applied to a string value, <0,30>,
return the correct result, <0,30>.
On my i386 (with OpenOffice.org 1.1.4) the same function applied to same
value return a wrong result, <0>.
Why?
perharps something to do with locale ?
a
Laurent Godard wrote:
Hi,
I have a problem with CDbl function.
On my IBook (with NeoOffice) CDbl applied to a string value, <0,30>,
return the correct result, <0,30>.
On my i386 (with OpenOffice.org 1.1.4) the same function applied to
same value return a wrong result, <0>.
Why?
perharps somethin
Hi again,
I would expect that the i386+OOo1.1.4 needs a point as decimal separator
did you try cDbl(0.30)
I try with 0.30, this is the result: <0,02>
what about cDbl("0.30") or cDbl("0,30")
That's strange though
Laurent
--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> ht
Laurent Godard wrote:
Hi again,
I would expect that the i386+OOo1.1.4 needs a point as decimal separator
did you try cDbl(0.30)
I try with 0.30, this is the result: <0,02>
what about cDbl("0.30") or cDbl("0,30")
That's strange though
cDbl("0.30") ---> 0,02
cDbl("0,30") ---> 0
Laurent
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
Laurent Godard wrote:
Hi again
cDbl("0.30") ---> 0,02
cDbl("0,30") ---> 0
0,02 !! where does it come from ?
I don't know...
This is my code
Dim oCell as Object
Dim sVal as String
oCell = oCells.getCellByPosition(0, 0)
sVal = oCell.string
oCell.value = CDbl(sVal)
Value on cell is <'0,3
Le 2005-03-03 14:22, Sevastian `seva` Foglia a écrit :
This is my code
.
Dim oCell as Object
Dim sVal as String
oCell = oCells.getCellByPosition(0, 0)
sVal = oCell.string
oCell.value = CDbl(sVal)
.
Value on cell is <'0,30>.
With your code and your cell content I get a runtime error from CDb
With your code and your cell content I get a runtime error from CDbl :
"Incompatible data types". This is normal because the string does not
represent a number. You should remove the apostrophe.
If you don't get a runtime error then you have somewhere an instruction
On Error Resume Next. Of cou
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
>
> 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
> On my PC with Debian and OOo
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
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".
Best Regards
Christian Junker
Sevastian `seva` Foglia wrote:
With your code and your cell content I get a runtime error from CDbl
: "Incompatib
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 Ne
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
-
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
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 Tools>Options>Language Settings).
Best Regards
Christian Junker
Davide Dozza wrote:
Christian Junker wrote:
Hi Sevastian,
I tested your piece o
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
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
18 matches
Mail list logo