Re: [API] Priority Problem with AND and OR

2015-10-13 Thread Andrea Pescetti
On 13/10/2015 Andrew Douglas Pitonyak wrote: The real question becomes should it be changed to follow expected mathematical norms (breaking all existing correct code and fixing all broken code where people assumed it was done in the generally accepted way). No, but we should advise people t

Re: [API] Priority Problem with AND and OR

2015-10-13 Thread Howard Morris (aka Col Boogie)
Not true or misstated, see https://technet.microsoft.com/en-us/library/ms186992%28v=sql.105%29.aspx for correct priority of operators. Without parentheses AND is evaluated before OR Attached is a little browser program I use to test Boolean arithmetic. It is written in html && stands for AND, ||

Re: [API] Priority Problem with AND and OR

2015-10-13 Thread Andrew Douglas Pitonyak
On 10/13/2015 06:25 AM, Regina Henschel wrote: Other example: Basic has no shortcut evaluation of boolean expressions. A major annoyance to me. It causes a bunch or nested if statements. -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.odt Info: http://www.pito

Re: [API] Priority Problem with AND and OR

2015-10-13 Thread Regina Henschel
Hi, Andrew Douglas Pitonyak schrieb: [..] The real question becomes should it be changed to follow expected mathematical norms (breaking all existing correct code and fixing all broken code where people assumed it was done in the generally accepted way). I am glad I need not make that call.

Re: [API] Priority Problem with AND and OR

2015-10-12 Thread Andrew Douglas Pitonyak
Guenter, although you are correct with respect to Basic as implemented in AOO (and you stated it very well... I enjoyed your post), I am not aware of any other computer language where this is true. For example: C and C++ http://en.cppreference.com/w/c/language/operator_precedence Java is the s

Re: [API] Priority Problem with AND and OR

2015-10-12 Thread Guenter Marxen
Hi, Am 12.10.2015 um 21:40 schrieb Mathias Röllig: ... What do you expect? For logical operations AND is equivalent to * and OR is equivalent to +. no, that's not true. AND and OR have the same priority, just as * and / (division). (* and / have a higher priority than + and -.) AND should ha

Re: [API] Priority Problem with AND and OR

2015-10-12 Thread Andrew Pitonyak
I was tempted to open a bug against this some years back, but, this is the type of change that I can't help but wonder if it is more dangerous to affect existing code, or to use rules by new users who are unaware that ^ does not follow expected rules, and neither does AND and OR. Same is true

Re: [API] Priority Problem with AND and OR

2015-10-12 Thread Rory O'Farrell
On Mon, 12 Oct 2015 15:45:16 -0400 Andrew Pitonyak wrote: > Yes, I note this travesty in OOME. There is also a difference in the > way that it handles exponentiation. Standard rules indicate that 2^3^4 > is evaluated as 2^(3^4) rather than (2^3)^4, wihch is what OOo does. This problem came up

Re: [API] Priority Problem with AND and OR

2015-10-12 Thread Andrew Pitonyak
Yes, I note this travesty in OOME. There is also a difference in the way that it handles exponentiation. Standard rules indicate that 2^3^4 is evaluated as 2^(3^4) rather than (2^3)^4, wihch is what OOo does. On 12.10.2015 15:40, Mathias Röllig wrote: Hello! I stumbled into a priority proble