mIRC Home    About    Download    Register    News    Help

Print Thread
Ability to use $* multiple times #51149 24/09/03 05:36 PM
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.

Re: Ability to use $* multiple times #51150 24/09/03 07:29 PM
Joined: Feb 2003
Posts: 2,803
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,803
You can.

How are you using in which prevents this?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: Ability to use $* multiple times #51151 24/09/03 07:31 PM
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?

Re: Ability to use $* multiple times #51152 24/09/03 07:47 PM
Joined: Feb 2003
Posts: 2,803
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,803
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!
Re: Ability to use $* multiple times #51153 24/09/03 08:29 PM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
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
Re: Ability to use $* multiple times #51154 24/09/03 08:32 PM
Joined: Feb 2003
Posts: 2,803
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,803
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!
Re: Ability to use $* multiple times #51155 24/09/03 08:36 PM
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

Re: Ability to use $* multiple times #51156 24/09/03 08:56 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
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
Re: Ability to use $* multiple times #51157 24/09/03 09:42 PM
Joined: Feb 2003
Posts: 2,803
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,803
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!
Re: Ability to use $* multiple times #51158 24/09/03 09:43 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
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
Re: Ability to use $* multiple times #51159 24/09/03 10:16 PM
Joined: Dec 2002
Posts: 3,127
P
ParaBrat Offline
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
Re: Ability to use $* multiple times #51160 24/09/03 10:29 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
yep.


new username: tidy_trax
Re: Ability to use $* multiple times #51161 25/09/03 04:21 AM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
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
Re: Ability to use $* multiple times #51162 25/09/03 04:33 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
doesn't really matter......?


new username: tidy_trax
Re: Ability to use $* multiple times #51163 25/09/03 04:42 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I would suggest that more read versions.txt than the help file.

Re: Ability to use $* multiple times #51164 25/09/03 02:49 PM
Joined: Jun 2003
Posts: 242
R
r0ck0 Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
But $* is still nothing like $?*