Attachments (0)
Change History (5)
comment:1 by , 17 years ago
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:2 by , 17 years ago
Just to further explain what JP said, the first expression becomes
True And False
Which is false and that's what your first test shows. Now, your second expression becomes
True Or False
because we've already established "True And False" is False. So, now that the Or operate is in play and True is part of the expression, the result is True.
Thus, as JP says, this is not a bug.
comment:3 by , 17 years ago
"True" and "False" may be any logical expressions, VBScript code
WScript.Echo vbTrue Or vbTrue And vbFalse
Return True
comment:4 by , 17 years ago
in others languages this expression return True too
that is, it is AutoIT feature?
comment:5 by , 17 years ago
A lot of languages give the AND operator higher precedence than OR. In those languages your two statements are equivalent. However, as documented in the helpfile(AutoIt -> Language Reference -> Operators), AND and OR have the same precedence thus your statement is evaluated left-to-right in the manner I have described.

your expressions are not equivalent as they are executed left to right
the first is (True or True) and False
No BUG