mIRC Homepage
Posted By: tidy_trax $?N - 23/05/05 05:31 PM
I would like the $?N feature to support things like 1-, for example:

Code:
//tokenize 32 1 2 3 | echo -a $?1-


The above would echo 1 2 3 instead of 1 as it currently does.

Code:
//tokenize 32 1 2 3 | echo -a $?1-2


The above would echo 1 2

I would also like it to support $0 and $*:

Code:
//tokenize 32 1 2 3 | echo -a $?0


The above would echo 3

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


The above would echo
1
2
3


I know I could just use $?1 $2- but I'd prefer using $?1-
Posted By: starbucks_mafia Re: $?N - 23/05/05 06:11 PM
I can't think what $?* or $?0 would actually do. $?* couldn't be used anyway because that's already a valid identifier. Even for $?N-M, would that just ask for each parameter that wasn't present up to M?
Posted By: tidy_trax Re: $?N - 23/05/05 09:00 PM
$?1-4 would do the same as $?4 except if $4 exists it will return $1-4
Posted By: Stealth Re: $?N - 27/05/05 07:08 AM
Huh?

$? makes an input box... what would $?whatever do?

/me doesnt get it
Posted By: Hrung Re: $?N - 27/05/05 07:34 AM
from versions.txt:

26/03/95 - mIRC v2.8c etc...

15.Can now also do $$?1 or $?1 which means, try to fill this
value with parameter one if it exists. If parameter one doesnt exist,
ask for it.

That is, it's like:

$iif($1 != $null,$1,$?)

I have to assume that this is deprecated since it isn't in the mirc.hlp, but it still works, at least for now.
Posted By: Sat Re: $?N - 27/05/05 09:10 AM
It is in the helpfile wink

From /help aliases:

Quote:
You can also do $$?1 or $?1 which means try to fill this value with parameter one if it exists. If parameter one doesnt exist, ask for it.
Posted By: Hrung Re: $?N - 27/05/05 06:58 PM
Woah. It took nearly 5 minutes to find it, even though I knew what page to look on, because it was in the middle of a paragraph that it didn't really seem to fit into, but you are correct. I had never seen it there before. I only knew it from the full versions.txt. Maybe $?N should be added to the index, and/or be given it's own paragraph and example. Just a thought.
Posted By: Sat Re: $?N - 27/05/05 10:53 PM
I agree, although I personally don't consider the $?N construction to be that important, given the ease with which it can be scripted..
Posted By: tidy_trax Re: $?N - 27/05/05 11:39 PM
Many of mIRC's identifiers are easily scripted with other identifiers, but since they were added I think they're all as important as each other.
© mIRC Discussion Forums