mIRC Home    About    Download    Register    News    Help

Print Thread
/var bug-problem #168892 16/01/07 11:41 AM
Joined: Dec 2006
Posts: 12
H
HellRaz0r Offline OP
Pikka bird
OP Offline
Pikka bird
H
Joined: Dec 2006
Posts: 12
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.

Re: /var bug-problem [Re: HellRaz0r] #168894 16/01/07 01:38 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
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.


Sais
Re: /var bug-problem [Re: Sais] #168897 16/01/07 01:45 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Re: /var bug-problem [Re: HellRaz0r] #168901 16/01/07 03:32 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759

Last edited by Mpdreamz; 16/01/07 03:32 PM.

$maybe
Re: /var bug-problem [Re: HellRaz0r] #169357 21/01/07 10:40 PM
Joined: Jan 2005
Posts: 20
C
C45P3R Offline
Ameglian cow
Offline
Ameglian cow
C
Joined: Jan 2005
Posts: 20
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...

Re: /var bug-problem [Re: C45P3R] #169372 22/01/07 09:54 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Actually thats all explained in the other topic smile
Dynamic local variables break the =
Its highly questionable if one really needs dynamic local variables.

Last edited by Mpdreamz; 22/01/07 09:57 AM.

$maybe