|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
OP
Hoopy frood
Joined: Nov 2004
Posts: 842 |
//var -guN %1 = A, %2 = B
Will not unset after N seconds, which I think it should.
Flames/opinions/whatever?
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Oct 2003
Posts: 3,918
Hoopy frood
|
Hoopy frood
Joined: Oct 2003
Posts: 3,918 |
what "should", in your opinion, be unset... %A or %B, or both? I don't think it's clear in that example which would be the intended behaviour-- which is probably why mIRC chooses none.
- argv[0] on EFnet #mIRC - "Life is a pointer to an integer without a cast"
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
Seconded... as "//var -sguN %1 = A, %2 = B" shows both results, imho it's clear what the *intended* behavior is.
|
|
|
|
Joined: Nov 2004
Posts: 842
Hoopy frood
|
OP
Hoopy frood
Joined: Nov 2004
Posts: 842 |
Yeah, sorry, I meant both. :X
What do you do at the end of the world? Are you busy? Will you save us?
|
|
|
|
Joined: Dec 2002
Posts: 2,031
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,031 |
IMO, it should just do as it's told and unset both. If the user doesn't want both to be unset then they can set the other(s) with a separate command.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
I agree. It should apply to all variables in the list. If somebody wants to unset two variables after 5 seconds, but also set a permanent one, then they could simply do: //var -gu5 %1 = A, %2 = B | var -g %3 = C
|
|
|
|
Joined: Jun 2008
Posts: 17
Pikka bird
|
Pikka bird
Joined: Jun 2008
Posts: 17 |
What does a global variable do that's different from a regular one?
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Well it's not a case of global versus regular, but rather a case of global versus local.
A local variable only exists within the scope it is created - it is only accessible within the function/event/etc that created it and it is immediately unset once that function/event/etc ends. Global variables are accessible from anywhere and are permanent unless explicitly unset with the unset command.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
|
|