"Leopold Toetsch" <[EMAIL PROTECTED]> wrote:
On Oct 21, 2005, at 14:11, Roger Browne wrote:

From within a PIR sub or method, how can I detect how many return values
the caller is expecting?

I'm wondering how to implement a method that will return an error code
if its caller is prepared to receive one, otherwise it will raise an
exception.

Anyone have any suggestions?

op result_count(out INT)        # TODO or some such

I'm guessing TODO means "it's not done yet"? But I was wondering, would a more general solution not be to have an op that hands back the results PMC constant that specifies the types as well as number of return values, then you can just call the elements vtable function for that PMC to get the number of arguments, plus other info is available too, and we just have the one new op?

Either way, I should have time to look at putting an op to do something like this in soon, if leo or @other don't beat me to it. ;-)

Jonathan

Reply via email to