mIRC Home    About    Download    Register    News    Help

Print Thread
S
Sigh
Sigh
S
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,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
You can.

How are you using in which prevents this?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
S
Sigh
Sigh
S
//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,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
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,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
Not sure iof this is what you mean exactly, but

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

works like a charm for me

Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
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!
S
Sigh
Sigh
S
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

P
pheonix
pheonix
P
$* is an undocumented command and does nothing like $?* smile

Joined: Feb 2003
Posts: 2,737
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,737
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!
P
pheonix
pheonix
P
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

Joined: Dec 2002
Posts: 3,015
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 3,015
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

P
pheonix
pheonix
P
yep.

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

P
pheonix
pheonix
P
doesn't really matter......?

Joined: Dec 2002
Posts: 2,958
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Dec 2002
Posts: 2,958
I would suggest that more read versions.txt than the help file.

R
r0ck0
r0ck0
R
But $* is still nothing like $?*


Link Copied to Clipboard