mIRC Homepage
Posted By: FiberOPtics & iswm bug - 29/12/05 03:52 AM
From 02/04/97 - mIRC v5.0

Quote:
73.Can now use & character as a wildcard one word match, eg.

& lines would &
These lines would match


//if (& & iswm ab cd) echo match

--> doesn't match

//if (& iswm cd) echo match

--> does match

//if (& iswm &cd) echo match

--> doesn't match (no it doesn't confuse the &cd for a binvar because //if (& isin &cd) echo -a, works fine)

//if (& iswm cd&) echo match

--> does match

My point is, there seems to be some inconsistency in the way & matches, and it would be nice to see the behaviour of & fixed.
Posted By: Sat Re: & iswm bug - 29/12/05 11:30 AM
This isn't a bug: & is an operator, and mIRC simply uses the first operator that it finds in conditions. Putting the wildcard text in a variable will overcome the problem.
Posted By: FiberOPtics Re: & iswm bug - 29/12/05 12:41 PM
This report is not about the & bitwise operator it is about the & wildcard that matches a standalone word, which you could have known because I explicitly quoted the line that says:

Quote:

73.Can now use & character as a wildcard one word match, eg.

& lines would &
These lines would match


There's no reason for: //if (& iswm &cd) echo match

not to work, as it is a completely unambiguous iswm statement.
Posted By: Sat Re: & iswm bug - 29/12/05 12:45 PM
Ah, I thought the second part of your examples was merely a further illustration of the first problem, sorry. Yes, it seems like that is a bug, and a rather strange one at that! The same failure to match happens in "on TEXT" triggers, so this is not an /if-related problem either..
Posted By: Zmodem Re: & iswm bug *DELETED* - 04/01/06 07:17 PM
(empty)
Posted By: FiberOPtics Re: & iswm bug - 04/01/06 07:57 PM
& is a wildcard that matches a "word", it is very different from * which matches anything (character, word, sentence)

Your own examples don't even hold water:

//if (& iswm cd&) echo true

That echoe's true, however by your rationale that should not echo anything because you would need to use:

//if (*& iswm cd&) echo true



Because this is the normal case, check this:

//if (a iswm bla) echo match
--> no match

//if (*a iswm bla) echo match
--> match

& matches a word, get it?

//if (& iswm thisisalongword) echo match
--> match


The bug lies in the fact that:

//if (& iswm &bla) echo match

doesn't echo match, whilst there is no reason for it not to, because just like in the example before this, I'm simply trying to match one word, very different from:

//if (&* iswm &bla bla bla bla) echo match
--> match, which matches not just a word, but a whole sentence

Next time educate yourself first on the matter before trying to school me.
© mIRC Discussion Forums