Apache OpenOffice (AOO) Bugzilla – Issue 52508
Weird operator priorities
Last modified: 2017-05-20 11:27:26 UTC
Hello, I found several a bug in OOO 1.1.4 - the And and Or operators in the StarBasic seem to have the same priority which is a thing I have never seen before - even my 18 years 8-bit computer has higher priority for And.
Can you give us some sample code or attach a document with a macro describing the wrong behavior? cyb->ab: this is one for you, I guess.
bovlk is right, example: Sub Main() v1 = 14 v2 = 59 v3 = 177 a = v1 Or v2 And v3 msgbox a ' Prints 49 ' like: a = (v1 Or v2) And v3 msgbox a ' Prints 49 ' instead of a = v1 Or (v2 And v3) msgbox a ' Prints 63 End Sub -> STARTED, P4->P3, -> OOo Later
I found a similar problem that should be fixed in the scope of this task: If Not a = 4 Then in SB is wrongly evaluated as If (Not a) = 4 Then instead of If Not (a = 4) Then
Reset assigne to the default "issues@openoffice.apache.org".