I see what you are saying but you have made just a few incorrect assumptions:

You say that strings *can* affect conditionals. This is correct because they are *supposed to* affect them.

Quote:
What I meant to show was that using if (%var == $null) compared to if (!%var) is not actually the same comparision (as is quoted by the help file - but I grabbed the wrong lines.. :P).


This is correct, as far as it goes. "if (!%var)" literally means "if ((%var == 0) || (%var == $false) || (%var == $null))" .. and not just any of the three checks. However, since you, the scripter, should know what values you're putting into that %var, then you should check for exactly what it is you want to check for, be that == $null), == $false), == 0) or (!%var). No, 0 != $null; you can decrement a variable to 0, at which point is becomes !$true, but you might still need that 0 value as a value that is valid in and of itself...or you might not. It depends on the needs of your script and what, exact, it is that you're checking for.

For example: a clone kicker could use a while condition to kick clone nicks out of the channel such that:

Code:
  ; Ban the clones using $wildsite
  mode $chan +b $wildsite
  ;
  ; Once $ialchan($wildsite,$chan,0) reaches 0, then the following condition will return the number
  ; of remaining nicks (also 0 .. or $false) on $chan.
  while ($ialchan($wildsite,$chan,0)) {
    ;
    kick $chan $ialchan($wildsite,$chan,$ifmatch).nick Clones begone.
    ;
    ; After the kick, the number of remaining clones *should* be reduced by one unless more have 
    ; made it into the channel (lag can sometimes let this happen).
  }

In the above script snippet, I *could* have checked to see if ($ialchan($wildsite,$chan,0) == 0) specifically, but that would simply add another layer of comparison that isn't needed since the original comparison resolves the way I want it to. If I'd have wanted to, I could have just had it check for ($ialchan($wildsite,$chan,0).nick) and then kicked $ifmatch, since the condition will return $null (which equates to $false) when no more nicks are found and drop out of the while loop ... same principal, slightly different application.
Code:
  mode $chan +b $wildsite
  while ($ialchan($wildsite,$chan,0).nick) kick $chan $ifmatch Clones begone.

As for your alias, your Full False (and Full True, for that matter) ONLY checks to see if it's $null or not; it doesn't check for 0 or $false, thus it's incomplete in terms of complete (Full) evaluation of the variable. Anything that is not 0, $false or $null is true. ANYTHING at all...be it a string, a non-zero number or $true. Of course, the reverse is also true. Anything that is 0, $false or $null is !$true and will fail in any conditional expression (such as in an If, ElseIf or While condition).


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C