mIRC Homepage
Posted By: HellRaz0r /var bug-problem - 16/01/07 11:41 AM
var %BindName = $remove($1-,%Trigger), %BindValue = $v1 << works
var %BindName $remove($1-,%Trigger), %BindValue = $v1 << doesnt
var %test1 one, %test2 = two << works
var %test1 = one, %test2 = two << works

This problem is probably due to the way the var command evaluates $identifiers i dont see why this problem needs to be there tho.
Posted By: Sais Re: /var bug-problem - 16/01/07 01:38 PM
var's syntax is

Code:
var %var = val


The fact that
Code:
var %var val

sometimes works is an artifact, from what I understand. Therefore code should not depend on that form.

I, personally, wouldn't be averse to having set and var's syntax consolidated to one or the other form. Preferably with '=' it's just more aesthetically pleasing, imho laugh

P.S. I am pretty certain your point has been raised several times previously.
Posted By: Riamus2 Re: /var bug-problem - 16/01/07 01:45 PM
Right. As long as there is any identifier used for the variable, you need the = sign. And, since this is the correct syntax for /var, I don't think that's an issue. Just use = regularly and you'll be fine.
Posted By: Mpdreamz Re: /var bug-problem - 16/01/07 03:32 PM
Why = is your friend :p
Posted By: C45P3R Re: /var bug-problem - 21/01/07 10:40 PM
Well....

Code:
//var %x = 100, %t [ $+ [ %x ] ] $rand(1, [ %x ] ) | echo -a %t [ $+ [ %x ] ]


Produces "#" and

Code:
//var %x = 100, %t [ $+ [ %x ] ] = $rand(1, [ %x ] ) | echo -a %t [ $+ [ %x ] ]


Produces "= #"

Figure that one out...
Posted By: Mpdreamz Re: /var bug-problem - 22/01/07 09:54 AM
Actually thats all explained in the other topic smile
Dynamic local variables break the =
Its highly questionable if one really needs dynamic local variables.
© mIRC Discussion Forums