- Nov
- 76
- 1
Hi all.
I'm fiddling with parameter expansion and I can't get this to work.
Could this be a (known) bug?
FUNCTION x=`par1=%1, par2=%2, rest=%3$`
However the %3$ doesn't work.
ECHO %@x[one two three four five six seven]
par1=one, par2=two, rest=three$
ECHO %@x[one,two,three,four,five,six,seven]
par1=one, par2=two, rest=three$
So why is this being ignored? I tried %3-$ also (since %-n$ is permitted), but that didn't work either.
According to the help :
This isn't mission critical, I'm just curious as to why it doesn't work.
Thanks.
===
Mark/x13
I'm fiddling with parameter expansion and I can't get this to work.
Could this be a (known) bug?
FUNCTION x=`par1=%1, par2=%2, rest=%3$`
However the %3$ doesn't work.
ECHO %@x[one two three four five six seven]
par1=one, par2=two, rest=three$
ECHO %@x[one,two,three,four,five,six,seven]
par1=one, par2=two, rest=three$
So why is this being ignored? I tried %3-$ also (since %-n$ is permitted), but that didn't work either.
According to the help :
The parameter %n$ has a special meaning. TCC interprets it to mean "all arguments, from parameter n
to the end." If n is not specified, it has a default value of 1, so %$ means "all arguments passed to the
function."
to the end." If n is not specified, it has a default value of 1, so %$ means "all arguments passed to the
function."
This isn't mission critical, I'm just curious as to why it doesn't work.
Thanks.
===
Mark/x13