To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=112874
                 Issue #|112874
                 Summary|Format is not compatible with CSng/Cdbl in Finnish loc
                        |ale/space separator 
               Component|scripting
                 Version|DEV300m84
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P4
            Subcomponent|code
             Assigned to|kr
             Reported by|ristoi





------- Additional comments from ris...@openoffice.org Fri Jul  2 09:24:43 
+0000 2010 -------
I made some testing with numbers and Format function etc.

Observation: Format and CSng functions are not working together in Finnish
locale if number is over 1000 (with thousand separator) but result is error
message when Standard format number string is the parameter of CSng function.

Function Cdbl behaves quite same as CSng.

Related problems:
Issue 70236
Issue 78144
Issue 21413

Observed difference here is that it occur also in Windows so it may be new case
or may not.  A space as the separator seems to be key issue?

Regards
Risto

PS. Here below is Basic macro testing program with results as (second) comments.
Removing (first) comment you can test with other lines. I test also CLng
function and it gives interesting results too.
RJ. 

REM  *****  BASIC  *****

Sub Main
REM testataan erottimia (ja ÀÀkkösiÀ)
DIM vLuku as Variant
vLuku = Format(1234.5,"Standard")
        
REM Ubuntu 10.04
'Inputbox("Kopioi","Testi",   CSng(vLuku))              'Quite same as simple 
Print, but
more easy to copy results

                                'Locale->        English - USA                  
Finnish                                 German (Germany)        
Print CSng(vLuku)                       '1234                                   
...type mismatch.               1234
'Print CSng("123.5")            '123                                    ...type 
mismatch.               1235
'Print CSng("123,5")            '1235                                   123     
                                        123
'Print CSng("123 5")            '...type mismatch.      ...type mismatch.       
        ...type mismatch.
'Print CLng(vLuku)                      '1                                      
        1                                               1
'Print CLng("123 5")            '123                                    123     
                                        123
'Print CLng("123,5")            '123                                    123     
                                        123
'Print CLng("123.5")            '123                                    123     
                                        123

REM Vista m82
'Inputbox("Kopioi","Testi",  Csng("123 5"))             'Tästä saa kopioitua 
sen, mitä
Print esittää näytölle

                                'Locale->        English - USA                  
Finnish                                 German (Germany)        
'Print CSng(vLuku)                      '1234.5                                 
...type mismatch.               1234,5
'Print CSng("123.5")            '123.5                                  ...type 
mismatch.               1235
'Print CSng("123,5")            '1235                                   123,5   
                                123,5
'Print CSng("123 5")            '...type mismatch.      ...type mismatch.       
        ...type mismatch.

End Sub

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@script.openoffice.org
For additional commands, e-mail: issues-h...@script.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to