;legacy if-statements:
if var
if %var%
if a = b ;treated as: if (a = "b") [= is one of the 7 operators: = <> != < <= > >=]
;note:
if a == b ;treated as: if (a = "= b") [== is not one of the 7 operators]

An if-statement that contains an expression is differentiated from a traditional-if such as If FoundColor <> Blue by making the character after the word "if" an open-parenthesis. Although this is usually accomplished by enclosing the entire expression in parentheses, it can also be done with something like if (x > 0) and (y > 0). In addition, the open-parenthesis may be omitted entirely if the first item after the word "if" is a function call or an operator such as "not" or "!".

The rules of the distinction between traditional if and if expression are documented as,

if (expresssion) wrote:
An if-statement that contains an expression is differentiated from a traditional-if such as If FoundColor <> Blue by making the character after the word "if" an open-parenthesis. [...] In addition, the open-parenthesis may be omitted entirely if the first item after the word "if" is a function call or an operator such as "not" or "!".

So if %var% shouldn't be traditional if, but rather if expression since the first item after the word if is an operator. That being said, it seems %% isn't consider an operator such as the others though, this should be clarified, for example something like if %var%v = 1, does traditional if. In addition, if expression page should either mention that if %var% and if (var) are functionally identical, similar to the remarks on the return expression page, if there is a reason for this, eg., backwards compatibility, if there is no reason for this behaviour, I would call it a bug (although I highly doubt this is isn't intended).

Also note,

If Statement wrote:Common cause of confusion: There are several other types of If statements, some of which look very similar to If (expression). These should be avoided in new scripts. If in doubt, it is best to always begin the expression with an open-parenthesis.

Which you can read as, this is a total mess, just put () around your if expressions and don't even bother to try to get the logic of this. That is what I did in v1, it worked.

The missing link is that the Expression in If Expression is a Numeric Parameter. If Var isn't implemented as a distinct type of statement, but as an If Expression where the parameter has reverted to a non-expression (like Return %var%). I probably didn't think of that when I wrote the new documentation, since If Var was already listed on the page for legacy If.

Helgef wrote:That was clear, hence my comments,

I literally contradicted you. If it was truly clear, you could have avoided writing inaccurate statements.

The documentation literally says, in the most relevant place possible, An if-statement that contains an expression is differentiated from a traditional-if [...], consequently, saying that the documentation says that The rules of the distinction between traditional if and if expression are documented as, [...] isn't making a false statement, not even in isolation. Given these rules, it is not a false statement to say that, So if %var% shouldn't be traditional if, but rather if expression since the first item after the word if is an operator. I then proceeded with That being said..., which clearly conveys that these rules are not complete(ly correct).