mIRC Home    About    Download    Register    News    Help

Print Thread
#99479 02/10/04 10:39 AM
R
RagingDemon
RagingDemon
R
why is that:
var %z. [ $+ [ %i ] ] = 1 sets %z to "= 1" instead of "1"?

var %z. [ $+ [ %i ] ] 1 works fine...
var %z.5 = 1 works fine too...

why isn' t it working correctly if [] and = are present at the same time?
/var is supposed to be syntaxed with a "=" (i know it also works ok without it)

#99480 02/10/04 10:31 PM
Joined: Dec 2002
Posts: 206
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 206
you don't actually need the []'s when you use /set or /var, only when trying to access the contents of that variable later. If you do

var %z. $+ %i = 1

it will work just fine, as would

set %z. $+ %i 1

#99481 02/10/04 10:38 PM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
If you try it out though you'll see that //var %i = 1 | var %z. $+ %i = 1 A | echo -a %z.1 will actually echo = 1 A. It's a bug.

#99482 03/10/04 02:34 AM
Joined: Dec 2002
Posts: 206
H
Fjord artisan
Offline
Fjord artisan
H
Joined: Dec 2002
Posts: 206
Oh, my mistake.. guess I should have actually tried that before I said anything. Yes, this does appear to be a bug.

#99483 03/10/04 11:03 AM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787
So why is that a bug? *looks confused*

%i = 1
var %z.%i (%z.1) = 1 A
%z.1 = 1 A

hmm?

I can see why the first one is a bug since it returns a '=' but yours looks fine.

Eamonn.

#99484 03/10/04 11:48 AM
Joined: Dec 2002
Posts: 2,884
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,884
But mine echoes an equals sign aswell.


Link Copied to Clipboard