I still think it's perfectly reasonable that mIRC acts this way, but I'll be more careful to look from the help and test things this time.

There are three things that you need to keep straight here: comparisons, boolean operators for expressions, and logical operators. The second sort are never given a name in the help; I only call them logical operators so I can talk about them as distinct from the previous sort, which ARE referred to in the help.

Comparisons are the following:
Code:
%a == %b
%a !== %b
$nick isop $chan
$0
%a
!%a

Comparisons are not the following:
Code:
(%a == %b)
(%a)
!(%a)

Comparisons are only the v1, v2, etc and the boolean operator for expressions. Boolean operator for expressions are the following:
Code:
== in %a == %b
!== in %a !== %b
isop in $nick isop $chan
$0 in $0
%a in %a
!%a in !%a

If you really wanted to, you could consider the $ or % or !% on its own to be the boolean operator--functionally, it doesn't matter. You can invert a boolean operator for expressions by adding a ! to the beginning of it (unless it already has one). This only works for the operators for expressions. You cannot invert (%a) because (%a) isn't an operator in this sense. Only %a with no parenthesis is.

Your logical operators include only parenthesis (), &&, and ||. These can only be used on comparisons. ! is not a logical operator, nor is it described as one. The help only says,
Code:
To negate an operator you can prefix it with an ! exclamation mark.

and the help does not refer to &&, ||, or the parenthesis as operators at all.

I'm not sure I understand your theory entirely, but if I do, it would mean that (($me) isop ($chan)) is the same as ($me isop $chan), which it is not. There is nothing saying you can put parenthesis around any part of the conditional part of an if statement and let it have the same meaning.

I would consider !(%a && %b) less readable than (!%a) || (!%b). Putting the first into words, it says "the inverse of true if and only if both of a and b are true," while the second one is "true if and only if either a or b is false". For anyone who understands simple boolean logic very well, as someone who uses these terms often should, these statements are the same, and the second statement is simpler.

Last edited by madewokherd; 13/11/03 01:24 AM.