Issue 52508 - Weird operator priorities
Summary: Weird operator priorities
Status: ACCEPTED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows 2000
: P3 Trivial
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-07-26 22:32 UTC by bovlk
Modified: 2017-05-20 11:27 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bovlk 2005-07-26 22:32:07 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.
Comment 1 christianjunker 2005-07-27 00:31:17 UTC
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.
Comment 2 ab 2005-07-27 08:48:17 UTC
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
Comment 3 ab 2005-08-12 13:15:16 UTC
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
Comment 4 Marcus 2017-05-20 11:27:26 UTC
Reset assigne to the default "issues@openoffice.apache.org".