Apache OpenOffice (AOO) Bugzilla – Issue 100600
"If a1 = a2 <> 0 Then" caused basic syntax error
Last modified: 2013-02-24 21:01:16 UTC
The following macros causes basic syntax error in OOo basic, while it could pass in vb6. Sub main() Dim a1 As Integer Dim a2 As Integer a1 = 1 a2 = -1 If a1 = a2 <> 0 Then MsgBox "a1 equals to a2" Else MsgBox "a1 doesn't equal to a2" End If End Sub It seems OOo basic fails to compile "If a1 = a2 <> 0 Then"
Created attachment 61220 [details] test document to demonstrate this issue
Created attachment 61221 [details] simple patch to fix this issue
pflin -> ab, Dear basic expert, I think you must have a better way to fix this issue. Thanks
ab->pflin: I'm not sure if there is a better one. At least the results for both a1=1,a2=-1 as for a1=1,a2=1 are the same as in vb6, so maybe the solution just *is* as simple. I will keep this as patch, assign it to cws ab6, target OOo 3.2 STARTED
.
Moving to cws ab72
FIXED
ab->jsk: Please verify using the test code. The code should compile. Result should be: "a1 doesn't equal to a2". If you change "a2 = -1" to "a2 = 1" result should be: "a1 equals to a2"
Verified
Close