mIRC Home    About    Download    Register    News    Help

Print Thread
#185584 11/09/07 11:08 AM
Joined: Jan 2006
Posts: 111
N
noMen Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jan 2006
Posts: 111
Why do I get these "strange" results:

Code:
t {
  var %a = abc def ghi
  if (!$istok(%a, $1, 32)) {
    echo -a no
  }
  else {
    echo -a yes
  }
  echo -a 1: !$istok(%a, $1, 32)
  echo -a 2: $istok(%a, $1, 32)
}

On /t abc I get the following results:
yes
1: !$istok(%a, abc, 32)
2: $true

On /t xyz I get the following results:
no
1: !$istok(%a, xyz, 32)
2: $false

Why isn't a negated identifier being echoed correctly? Btw I still use mIRC 6.17.

Last edited by noMen; 11/09/07 11:11 AM.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
The exclamation mark in front of an identifier only has special meaning inside an /if condition; in all other cases it has the same effect as any other char touching an identifier, ie it prevents the evaluation of the latter.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com

Link Copied to Clipboard