|
|
Joined: Dec 2002
Posts: 212
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 212 |
can anyone explain what is this? How come //.timer 1 1 scon -a if (($$!!server)) echo -a a $!!server or //.timer 1 1 scon -a $iif($!!server,echo -a a $!!server) produces this output: a a irc.interbgc.com a irc.zonebg.com
I have opened 3 server connections, the first one can't be established though. How can $!!server return something in the if comparison, and later return $null? (Sorry for spamming the servers)
And all I need now is intellectual intercourse, a soul to dig the hole much deeper
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
it returns $null because mirc doesn't know what the server is, but because you make it echo "a <server>" it will still output a, but not $null, so what you are seeing isn't a bug.
New username: hixxy
|
|
|
|
Joined: Dec 2002
Posts: 212
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 212 |
I'm pretty much aware of that, but as you can probably see there's a BIG if ($!!server) out there, which is NOT supposed to work when $!!server returns $null
And all I need now is intellectual intercourse, a soul to dig the hole much deeper
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
it doesn't return $null because it says a irc.server.com, $!!server returns irc.server.com according to your post anyway.
New username: hixxy
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
It's a result of some strange parsing based on whether anything is touching the identifiers.
For instance: //.timer 1 1 scon -a if ( $!!server ) echo -a a $!!server (notice the spaces between the parentheses) will work //.timer 1 1 scon -a if ($server) echo -a a $!!server (no spaces but no !'s either) will work //.timer 1 1 scon -a $!!iif( $!!server,echo -a a $!!ifmatch : $!!server) will work //.timer 1 1 scon -a $!!iif($server,echo -a a $!!ifmatch : $!!server) will work
Basically the important thing is to either put a space between the starting $ of an identifier and then use !!, or otherwise put something like a parenthesis against it and then use no !!'s.
I think this probably should be considered a bug, or at least a part of the parser which would be a hell of a lot better if it was altered.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Dec 2002
Posts: 212
Fjord artisan
|
OP
Fjord artisan
Joined: Dec 2002
Posts: 212 |
starbucks_mafia thanks, I really needed a workaround
And all I need now is intellectual intercourse, a soul to dig the hole much deeper
|
|
|
|
Joined: Jan 2003
Posts: 2,523
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 2,523 |
Imo it's not a bug. As far as /timer or /scon is concerned, a string of the form (something) is just plain text. /timer and /scon don't (and perhaps shouldn't) know that (something) is meant to be an if statement. Unless you consider a bug the fact that //echo -a ($me) echoes "($me)".
/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Fair point. I guess this is just another disadvantage of unquoted strings.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
|
|