mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 701
K
Kelder Offline OP
Hoopy frood
OP Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
//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 )

Joined: Jan 2005
Posts: 20
C
Ameglian cow
Offline
Ameglian cow
C
Joined: Jan 2005
Posts: 20
Just use $chr(59)

//if (ab isin $chr(59) $+ ab) echo $v1 . $v2 .
//if ($chr(59) isin $chr(59)) echo $v1 . $v2 .

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.


Gone.
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
//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.


New username: hixxy
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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?".

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
According to the help on comments, a ; comment must BEGIN the line. IMHO this is a bug in the parser.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard