mIRC Homepage
Posted By: Kelder ; after comparison operator in /if - 31/01/05 03:34 PM
//if (ab isin ;ab) echo $v1 . $v2 .
//if (; isin ; ) echo $v1 . $v2 .


Seems easy enough, but mIRC 6.16 gives * /if: invalid format
If the ; is the first character after the comparison operator, the /if apparently always fails...

(Hope this hasn't been brought up before, searching for ";" seemed troublesome wink )
Posted By: C45P3R Re: ; after comparison operator in /if - 31/01/05 04:53 PM
Just use $chr(59)

//if (ab isin $chr(59) $+ ab) echo $v1 . $v2 .
//if ($chr(59) isin $chr(59)) echo $v1 . $v2 .
Posted By: FiberOPtics Re: ; after comparison operator in /if - 31/01/05 06:30 PM
He knows that,

the question is, why does it give an error, since ; doesn't have a special meaning in an if comparison, so its textual representation should suffice, without resorting to the ascii number.

It's particularly strange that it doesn't error when there's a space between the ; and the bracket ) but it does without the space.
Posted By: tidy_trax Re: ; after comparison operator in /if - 31/01/05 06:38 PM
//if (; == wink echo -a fails
//if ( ; == wink echo -a fails
//if (1 == ;1) echo -a fails
//if (; == ; ) echo -a works
//if ( ; == ; ) echo -a works
//if (1 == 1;) echo -a does not give an error, but doesn't echo anything either, which is correct

The wink emoticon is supposed to be ; ) without a space.
Posted By: DaveC Re: ; after comparison operator in /if - 31/01/05 06:43 PM
Quote:
(Hope this hasn't been brought up before, searching for ";" seemed troublesome wink )


maybe the search engine has the same If comparison error :-)

NO actually thanks for pointing it out, I had never seen this problem, so would have sat there some day going "Damn theres nothing wrong with this if statement wheres the error?".
Posted By: argv0 Re: ; after comparison operator in /if - 01/02/05 06:11 PM
According to the help on comments, a ; comment must BEGIN the line. IMHO this is a bug in the parser.
© mIRC Discussion Forums