http://bugs.winehq.org/show_bug.cgi?id=10765
Summary: The Format function of Visual Basic 6 does not work properly Product: Wine Version: 0.9.49. Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P1 Component: wine-ole AssignedTo: wine-bugs@winehq.org ReportedBy: pabl0ski@hotmail.com
The Format function (it gives format to numbers/strings/...) of Visual Basic 6 does not work properly under wine. If a number is negative, it is converted to a positive number. There is a similar function called FormatNumber (only for numbers) and it works correctly.
http://bugs.winehq.org/show_bug.cgi?id=10765
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #1 from Dan Kegel dank@kegel.com 2007-12-13 06:19:40 --- Please post source and executable for a noninteractive program that demonstrates the problem. Thanks!
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #2 from pablo pabl0ski@hotmail.com 2007-12-13 09:23:18 --- Created an attachment (id=9614) --> (http://bugs.winehq.org/attachment.cgi?id=9614) This executable demostrates the error with the Format function of Visual Basic
Sub Main()
Dim Numero As Double Dim Formated_numero As Double
Numero = -1.57
Open "File1.txt" For Output As #1
Print #1, "Number without format: " & Numero Formated_numero = Format(Numero, "0.00") Print #1, "Formated number: " & Formated_numero
Close #1 End Sub
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #3 from pablo pabl0ski@hotmail.com 2007-12-13 09:27:32 --- Created an attachment (id=9615) --> (http://bugs.winehq.org/attachment.cgi?id=9615) In this module is the code of the executable
http://bugs.winehq.org/show_bug.cgi?id=10765
Jens Duttke J.Duttke@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |J.Duttke@web.de
--- Comment #4 from Jens Duttke J.Duttke@web.de 2008-03-26 02:18:03 --- The Format/Format$ function not only return wrong strings, if the value is negative. Here is another examples of differences between Windows and Wine:
Format: "##,##0.00"
Number: 1 Windows: 1,00 Wine: 001,00
Number: 5459.4 Windows: 5.459,40 Wine: 5459,40
Number: 12345678 Windows: 12.345.678,00 Wine: 12345678,00
Especially the first one, really looks ugly.
Are there any chances to get that fixed?
http://bugs.winehq.org/show_bug.cgi?id=10765
Adam Dempsey dempsey@weirdfish.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dempsey@weirdfish.net
http://bugs.winehq.org/show_bug.cgi?id=10765
Rob Shearman robertshearman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|ole |oleaut32
http://bugs.winehq.org/show_bug.cgi?id=10765
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |damjan.jov@gmail.com Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #5 from Damjan Jovanovic damjan.jov@gmail.com 2008-07-31 16:00:46 --- Still present in recent GIT.
A +variant trace shows things going wrong somewhere around VarFormat(), but the oleaut32 code is ... straight from hell :-).
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #6 from Damjan Jovanovic damjan.jov@gmail.com 2008-08-22 07:49:01 --- Created an attachment (id=15548) --> (http://bugs.winehq.org/attachment.cgi?id=15548) Handle negative numbers in VarFormat
Here's a patch that should fix negative numbers, I've already sent it to wine-patches.
I'm still looking at the thousands separators.
http://bugs.winehq.org/show_bug.cgi?id=10765
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #7 from Damjan Jovanovic damjan.jov@gmail.com 2008-08-25 13:47:55 --- Created an attachment (id=15637) --> (http://bugs.winehq.org/attachment.cgi?id=15637) Handle thousands separators
The minus sign patch is now in Git.
This patch, just sent to wine-patches, adds support for thousand separators.
With both patches all the test cases here pass, as do some new ones I've made, but there is still a few minor issues (for example, I think "#,." should divide by 1000 but doesn't) so this bug should stay open until they're all sorted out.
http://bugs.winehq.org/show_bug.cgi?id=10765
Gabriele Moabiti gabmoa@yahoo.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gabmoa@yahoo.it
--- Comment #8 from Gabriele Moabiti gabmoa@yahoo.it 2008-09-23 16:19:28 ---
There is another problem, see bug 15387
http://bugs.winehq.org/show_bug.cgi?id=10765
Jos Hulzink josh@stack.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |josh@stack.nl
--- Comment #9 from Jos Hulzink josh@stack.nl 2009-01-11 01:55:06 --- All test cases in this bug pass. Can we close this one ? If someone finds another a new bug can be filed.
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #10 from Damjan Jovanovic damjan.jov@gmail.com 2009-01-11 04:36:47 --- As I said, the Format function definitely still has some issues. Would you like separate bugs for those?
http://bugs.winehq.org/show_bug.cgi?id=10765
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #11 from Dan Kegel dank@kegel.com 2009-01-11 08:05:54 --- Yes, please!
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #12 from Jos Hulzink josh@stack.nl 2009-01-11 13:23:54 --- Well... since nobody has worked on the bug for four months, issues have been solved in other bugs, yes I think we should close this one...
http://bugs.winehq.org/show_bug.cgi?id=10765
--- Comment #13 from Dan Kegel dank@kegel.com 2009-01-11 13:44:28 --- It's already marked fixed. It will be marked closed when Alexandre does the next release.
http://bugs.winehq.org/show_bug.cgi?id=10765
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org 2009-01-16 10:37:25 --- Closing bugs fixed in 1.1.13.