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

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:

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

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

[API] Priority Problem with AND and OR

2015-10-12 Thread Mathias Röllig
Hello! I stumbled into a priority problem with the boolean operators AND and OR. I cannot find any documentation for this. First mathematical examples. With MsgBox( 3 * 2 ^ 2 ) you will see, that ^ has a higher priority than *. (2 ^ 2) = 4 4 * 3 = 12 With MsgBox( (3 * 2) ^ 2 ) you will get

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

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.

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