/help $parms
$parms
Returns an untokenized $1- for events and other command/identifier calls.
Exceptions to $parms matching $1- within the context where $1- changes:
1. $parms is changed to $null inside the $iif(Conditional,$true,$false) but only in the "Conditional" location. It resumes having the correct $parms value in the $true and $false branchings, as well as beyond the $iif() statement.
2. $parms is changed to $null by the /tokenize command
3. $parms is changed to null within my_alias when called as $my_alias(string) but matches $1- when called as "/my_alias string".
/parms_test parms created by input event
alias parms_test {
if ($isid) echo 4 -a parms passed to custom identifier is _null: $parms
else echo 3 -a parms passed to custom /command is correct: $parms
}
on *:INPUT:*:{
if (/parms_test * iswm $1-) {
echo 3 -a parms in main event: length $len($parms) $parms
noop $parms_test(test identifier)
/parms_test test command
echo 4 -a parms in iif conditional is null: $iif($1- == $parms,same (Conditional: 1- is $v1 parms= $v2 ) TrueCond= $parms,diff (Conditional 1- is $1- parms= $v2 ) FalseCond= $parms) $chr(3) $+ 3beyond iif: $parms
noop $findfile($mircdir,$nopath($mircini),0,1,echo 13 -a parms in findfile:$parms parms in iif_conditional-inside-findfile is null: $iif($1- == $parms,same (Conditional: 1- is $v1 parms= $v2 ) TrueCond= $parms,diff (Conditional 1- is $1- parms= $v2 ) FalseCond= $parms) $chr(3) $+ 3beyond iif: $parms )
echo 3 -a parms before tokenize: (1-)= $1- / parms= $parms
//tokenize 32 test string
echo 4 -a parms .after tokenize: (1-)= $1- / parms= $parms
halt
}
}
To preserve backwards compatibility, perhaps /tokenize could be given a -p switch to have it set $parms to match the new $1- within the current alias/event/editbox? I can see the value in having /tokenize preserve the original $parms value, but not in resetting it to $null.