mIRC Home    About    Download    Register    News    Help

Print Thread
#168892 16/01/07 11:41 AM
Joined: Dec 2006
Posts: 12
H
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.

Joined: Oct 2003
Posts: 313
S
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
Sais #168897 16/01/07 01:45 PM
Joined: Oct 2004
Posts: 8,330
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
Joined: Apr 2004
Posts: 759
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759

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

$maybe
Joined: Jan 2005
Posts: 20
C
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...

C45P3R #169372 22/01/07 09:54 AM
Joined: Apr 2004
Posts: 759
M
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

Link Copied to Clipboard