mIRC Home    About    Download    Register    News    Help

Print Thread
#115559 27/03/05 03:27 PM
Joined: Mar 2004
Posts: 33
M
Mc_Fly Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Mar 2004
Posts: 33
$* replace a while:
Code:
alias test echo TEST: $*
/test test ok !

And you get:
TEST: test
TEST: ok
TEST: !

Now, try:
Code:
alias test echo TEST: $len($*)
/test test ok !

You get:
TEST: 4
TEST: 4
TEST: 4
If i replace $len($*) by $len($($*,2)) i get the same.
In fact 4 chars are `~$*
If i replace $len($($*,2)) by $upper($*) i get:
TEST: test
TEST: ok
TEST: !

$* bug ?

#115560 27/03/05 06:00 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Khaled said he isn't going to fix $* so there's no point in reporting bugs about it.
That said, there's a messy workaround:

Code:
alias test scon -r echo TEST: $!len( $* )
/test test ok !


TEST: 4
TEST: 2
TEST: 1


New username: hixxy
#115561 27/03/05 10:19 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
That's potentially a very dangerous workaround without strict control of what $n contains.

Quote:
Khaled said he isn't going to fix $* so there's no point in reporting bugs about it.

- When and where was that? From versions.txt it's quite clear that $* currently isn't intended to be passable to identifiers, but I don't know of anywhere where the suggestion of implementing it has been ruled out.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
#115562 28/03/05 04:30 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Quote:
That's potentially a very dangerous workaround without strict control of what $n contains.


Of course, I assumed the user knew about /scon re-evaluating things.
I also used it as an example as it's perfectly safe as long as he doesn't let other people call the /test alias.

Quote:
Quote:
Khaled said he isn't going to fix $* so there's no point in reporting bugs about it.

- When and where was that? From versions.txt it's quite clear that $* currently isn't intended to be passable to identifiers, but I don't know of anywhere where the suggestion of implementing it has been ruled out.


I just did about 15 minutes of searching and cannot find the thread, but me and a few other people can remember him saying something like that.


New username: hixxy

Link Copied to Clipboard