I agree throwing an error would be better for occasions like:
if (a . b)
why would you want to check if a constant literal string is set/exists ? It will always return true so its a waste to check.
mIRC is pretty smart about it indeed:
//var %a = 2, %b = ==, %c = 22 | if ($+(%a, %a) %b %c) echo -a This will echo!
will still be treated as if (22 == 22)
in case of if ($hget()) its only paramater so
//hadd -m test test3 0 == 1 | if ($hget(test,test3)) echo -a $v1
will be true even tough the statement it evaluates to is false. This will also be the case if what jaytea suggested will be fixed.
However this:
alias if3parameters {
hadd -m t a 0
hadd -m t b ==
hadd -m t c 1
if ($hget(t,a) $hget(t,b) $hget(t,c)) {
echo -a $v1
}
}
wont echo.
edit: reply to kardofol not to you starbucks
