foo($var1, $var2, $var3);
What should I set in I1? Is it 3?
And here:
foo($var1, @arr2, %hash3);
Is it still 3, since these aren't gonna be flattened?
Q2: I'm calling without prototyping
foo($var1, $var2, $var3, ... , $var23);
Here, what should I place in I2? Is it 11 (as we have P5-P15) or
23 (considering the P3 register)?
Thanks (~: <---- he's a boxer, that's why he has a borken nose
First of all, are you targeting PASM or PIR? For the latter, its done
automatically.
> foo($var1, $var2, $var3);
> foo($var1, @arr2, %hash3);
> Is it still 3, since these aren't gonna be flattened?
Both have 3 params. If these are PMCs, they go in P5..P7, so *I2* would
be 3.
> Q2: I'm calling without prototyping
> foo($var1, $var2, $var3, ... , $var23);
> Here, what should I place in I2? Is it 11 (as we have P5-P15) or
> 23 (considering the P3 register)?
I would expect I2=11, I1=12
leo
I mean PASM
> > Q2: I'm calling without prototyping
>
> > foo($var1, $var2, $var3, ... , $var23);
>
> > Here, what should I place in I2? Is it 11 (as we have P5-P15) or
> > 23 (considering the P3 register)?
>
> I would expect I2=11, I1=12
D'oh, I suspected it should be I2=11, I1=23. It seems to me that
I finally got what was considered to be the parameter list. So, when
you say PARAMETER LIST, you have in mind all the I5-I15, N5-N15,
S5-S15, P3, P5-P15 registers, don't you? That is, I should place in I1
the number of these registers I filled.
Nope. I2 should be 3, and I1 0. (Assuming you put those three
parameters in the first three PMC registers, which is what you should
do even in the unprototyped case)
>And here:
>
>foo($var1, @arr2, %hash3);
>
>Is it still 3, since these aren't gonna be flattened?
I2 is still 3 and I1 0.
>Q2: I'm calling without prototyping
>
>foo($var1, $var2, $var3, ... , $var23);
>
>Here, what should I place in I2? Is it 11 (as we have P5-P15) or
>23 (considering the P3 register)?
I2 should be 11, and I1 should be 12.
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk
> D'oh, I suspected it should be I2=11, I1=23.
No. You have the first 11 parameters in P5..P15 (I2=11). Then you have 12
more, which go into the overflow array P3 (I1=12)
> ... It seems to me that
> I finally got what was considered to be the parameter list. So, when
> you say PARAMETER LIST, you have in mind all the I5-I15, N5-N15,
> S5-S15, P3, P5-P15 registers, don't you?
The parameter list are all the function parameters. When you have an
unprototyped sub, I5.., S5,.. N5... are unused.
> ... That is, I should place in I1
> the number of these registers I filled.
I1 ... Number of items in the overflow/parameter array P3.
leo
>=item I1
>
>The number of items pushed onto the parameter list.
is the personification of confusion.
> I1 ... Number of items in the overflow/parameter array P3.
Hell yeah. That's what should be there instead of PARAMETER LIST,
IMHO.
Thanks Leo, Dan for commenting on this thread.
(~:
Then I'll go clarify that. :)