https://bugs.documentfoundation.org/show_bug.cgi?id=166232

--- Comment #29 from Robert Großkopf <[email protected]> ---
(In reply to Cameron from comment #27)
> 
> - Regarding the use of CDec, you suggested to use the "Double" variable type
> as the "Decimal" does not exist (even though it is already documented as a
> variable type [1]). 
> [1]
> https://help.libreoffice.org/latest/en-US/text/sbasic/shared/01020100.
> html?DbPAR=BASIC

Funny to read this. Seems this should be a titel for the following variables
(Single, Double, Currency) There isn't shown any way to declare a variable as
DECIMAL.
When trying this I get an error in StarBasic for unknown datatype.

"Double" will be the way to get the highest precision in StarBasic. You could
change to CURRENCY - but it will only show a decimal value with 15 non-decimal
and 4 decimal places.

I have only tested, like I do this with many things in Basic:

SUB Devide
        a = "3,00"
        b = "1,50"
        ac = CDbl(a)
        msgbox ac
        c = CDbl(a) / CDbl(b)
        msgbox c
END SUB

Changed a to "3,00 €" or something else. It will give something like
"incompatible Datatype". Any character I add there will show this behavior. So
CDbl will need numbers, decimal separators and space only. 
Then tried the same with CDec and get "not implemented". So the Help of
LibreOffice isn't correct. Think it never exists…

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to