mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2003
Posts: 314
S
Sigh Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
I'm not sure whether this is a bug or done intentionally, but it would be useful to be able to use $* more than once in a process.

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
You can.

How are you using in which prevents this?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Aug 2003
Posts: 314
S
Sigh Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
//tokenize 32 1 2 3 | echo -a $* | tokenize 32 4 5 6 | echo -a $*

Or even:

//tokenize 32 1 2 3 | echo -a $* | echo -a $*

In which way does it work for you?

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Ah, you're right.
Any subsequent lines that contain $* are completely ignored and fail to execute.

It would be nice if this worked. Hopefully it's just something simple like a variable that he forgot to reset.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Not sure iof this is what you mean exactly, but

//echo -a $?*="enter one" $?*="Enter two:"

works like a charm for me


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Upon further testing, my assumption was correct.
Khaled failed to reset his iteration variable (%i) to 0 after processing $*

//tokenize 32 1 2 3 | echo -a 1st Set: $* | tokenize 32 4 5 6 7 8 9 0 | echo -a 2nd Set: $*

1st Set: 1
1st Set: 2
1st Set: 3
2nd Set: 7
2nd Set: 8
2nd Set: 9
2nd Set: 0


As you can see, on the second $* loop it starts off at i = 4, skipping the first 3 tokens of the second set. Perhaps this should be reposted in the Bug Reports forum. grin

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Aug 2003
Posts: 314
S
Sigh Offline OP
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
Ah, I guess I could add $0 random tokens to the beginning of a tokenize command if I want to use $* with it, til this is fixed, thanks

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
$* is an undocumented command and does nothing like $?* smile


new username: tidy_trax
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Actually $* is well documented, just never made it to the help file. Though I would say it has always been an experimental feature, and probably why it was never added to /help.

Here is what versions.txt has to say about it:

3.10 - 01. Added /ctcp $* performs command on all parameters.
3.50 - 16. Using $* improperly would result in a GPF.
3.51 - 16. Commands using $* were not processing commands following them.
6.02 - 65. Can now use $* as a parameter to an alias.

I'm curious about this 6.02 entry, is this to say that $* is now an official "parameter" identifier... or were there actual changes made to $* in this version? From my testing, I don't see any difference between 6.0 and 6.02. (Edit: Well, the aformentioned bug is slightly worse in v6.0)

Something else I find interesting. $1 first appears somewhere in v2.x and later refined in v5.0 (when it finally works for every command regardless), but I can't figure out why *1 and $parm1 was ever added if $N was already in the works.

It would seem $N was slowly being supported by more and more commands, where *N and $parmN worked globally as $N does now. I can't understand why 3 different methods were invented and refined parallel to eachother, or were there specific and unique uses for each method?

- Raccoon

Last edited by Raccoon; 24/09/03 09:54 PM.

Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i class undocumented as not being in the help file, seeing as how a lot of people are too lazy to read version.txt grin


new username: tidy_trax
Joined: Dec 2002
Posts: 3,127
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 3,127
and many are also "too lazy" to read the help file or the FAQ. imo, cant consider something "undocumented" just cause someone doesnt take the time to look about


ParaBrat @#mIRCAide DALnet
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
yep.


new username: tidy_trax
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
The option is documented as ParaBrat said. Again I find it problematic that you make assumptions based on opinion instead of fact frown


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
doesn't really matter......?


new username: tidy_trax
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I would suggest that more read versions.txt than the help file.

Joined: Jun 2003
Posts: 242
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
But $* is still nothing like $?*


Link Copied to Clipboard