Odd result $regml - 06/01/08 01:57 AM
I've made an alias to show the problem :
This alias make an hashtable with item like X.Y or X;Y and then catch all item that correspond with the pattern (here, all item).As you can see, %b is the last place where regex are used, so $regml(1) should return the token that separate X and Y but it's not the case.In my test, it appear that mirc return the good value of $regml at the beginning but after some iteration, just keep returning wrong value, here is one of my debug with this alias :
Is this a bug ? or am i doing something wrong ?
Code:
alias bugw { if ($hget(Ga)) hfree Ga var %a 10 while (%a) { hadd -sm Ga $+($r(1,9),%a,$iif($r(0,1),.,;),$(1,9),%a) $+(Data,%a) | dec %a } var -s %a $hfind(Ga,/\d+(\.|;)\d+/,0,r) while (%a) { var -s %b = $hfind(Ga,/\d+(\.|;)\d+/,%a,r) echo -a $regml(1) dec %a } }
Quote:
* Set %a to 10
-
* Set %b to 310.110
-
.
-
* Set %b to 69.19
-
.
-
* Set %b to 32.12
-
.
-
* Set %b to 91;11
-
.
-
* Set %b to 47;17
-
.
-
* Set %b to 88.18
-
.
-
* Set %b to 36.16
-
.
-
* Set %b to 74;14
-
.
-
* Set %b to 15;15
-
.
-
* Set %b to 43;13
-
.
-
* Set %b to 310.110
-
.
-
* Set %b to 69.19
-
.
-
* Set %b to 32.12
-
.
-
* Set %b to 91;11
-
.
-
* Set %b to 47;17
-
.
-
* Set %b to 88.18
-
.
-
* Set %b to 36.16
-
.
-
* Set %b to 74;14
-
.
-
* Set %b to 15;15
-
.
-
* Set %b to 43;13
-
.