mIRC Homepage
Posted By: Sigh Ability to use $* multiple times - 24/09/03 05:36 PM
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.
Posted By: Raccoon Re: Ability to use $* multiple times - 24/09/03 07:29 PM
You can.

How are you using in which prevents this?
Posted By: Sigh Re: Ability to use $* multiple times - 24/09/03 07:31 PM
//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?
Posted By: Raccoon Re: Ability to use $* multiple times - 24/09/03 07:47 PM
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.
Posted By: LocutusofBorg Re: Ability to use $* multiple times - 24/09/03 08:29 PM
Not sure iof this is what you mean exactly, but

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

works like a charm for me
Posted By: Raccoon Re: Ability to use $* multiple times - 24/09/03 08:32 PM
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
Posted By: Sigh Re: Ability to use $* multiple times - 24/09/03 08:36 PM
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
Posted By: pheonix Re: Ability to use $* multiple times - 24/09/03 08:56 PM
$* is an undocumented command and does nothing like $?* smile
Posted By: Raccoon Re: Ability to use $* multiple times - 24/09/03 09:42 PM
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
Posted By: pheonix Re: Ability to use $* multiple times - 24/09/03 09:43 PM
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
Posted By: ParaBrat Re: Ability to use $* multiple times - 24/09/03 10:16 PM
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
Posted By: pheonix Re: Ability to use $* multiple times - 24/09/03 10:29 PM
yep.
Posted By: LocutusofBorg Re: Ability to use $* multiple times - 25/09/03 04:21 AM
The option is documented as ParaBrat said. Again I find it problematic that you make assumptions based on opinion instead of fact frown
Posted By: pheonix Re: Ability to use $* multiple times - 25/09/03 04:33 AM
doesn't really matter......?
Posted By: Watchdog Re: Ability to use $* multiple times - 25/09/03 04:42 AM
I would suggest that more read versions.txt than the help file.
Posted By: r0ck0 Re: Ability to use $* multiple times - 25/09/03 02:49 PM
But $* is still nothing like $?*
© mIRC Discussion Forums