Issue 100600 - "If a1 = a2 <> 0 Then" caused basic syntax error
Summary: "If a1 = a2 <> 0 Then" caused basic syntax error
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: joerg.skottke
QA Contact: Unknown
Depends on:
Reported: 2009-03-27 03:57 UTC by pflin
Modified: 2013-02-24 21:01 UTC (History)
1 user (show)

See Also:
Issue Type: PATCH
Latest Confirmation in: ---
Developer Difficulty: ---

test document to demonstrate this issue (19.50 KB, text/plain)
2009-03-27 03:58 UTC, pflin
no flags Details
simple patch to fix this issue (462 bytes, text/plain)
2009-03-27 04:06 UTC, pflin
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pflin 2009-03-27 03:57:40 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"
        MsgBox "a1 doesn't equal to a2"
    End If
End Sub

It seems OOo basic fails to compile "If a1 = a2 <> 0 Then"
Comment 1 pflin 2009-03-27 03:58:30 UTC
Created attachment 61220 [details]
test document to demonstrate this issue
Comment 2 pflin 2009-03-27 04:06:41 UTC
Created attachment 61221 [details]
simple patch to fix this issue
Comment 3 pflin 2009-03-27 04:09:17 UTC
pflin -> ab,

Dear basic expert, I think you must have a better way to fix this issue.

Comment 4 ab 2009-04-03 14:31:35 UTC
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
Comment 5 ab 2009-04-28 07:24:35 UTC
Comment 6 ab 2009-06-04 08:39:15 UTC
Moving to cws ab72
Comment 7 ab 2009-06-23 11:07:18 UTC
Comment 8 ab 2009-07-22 10:52:40 UTC
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"
Comment 9 joerg.skottke 2009-08-04 12:42:45 UTC
Comment 10 joerg.skottke 2009-10-09 08:11:18 UTC