%x$ in function

x13

Nov 9, 2016
72
1
Netherlands
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 :

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."


This isn't mission critical, I'm just curious as to why it doesn't work.

Thanks.
===
Mark/x13
 

x13

Nov 9, 2016
72
1
Netherlands
That was it ! I couldn't figure out why it did this...

Silly me. I made a typo in my TCSTART that screwed-up ParamChar in the SETDOS line.

Thanks!