Is there a way to overload a method in SPIN?
Mike G
Posts: 2,702
Is there a way to overload a SPIN method or supply a variable length argument list?
Comments
If you want to supply a variable length argument list, you could pass the address of an array of pointers, possibly with an argument count as the first element. You could have several short "stub" routines with declared argument lists of various lengths and pass an argument count and the address of the first argument to your main routine since the actual parameters are pushed in order into the stack with the first being lowest in memory like:
It is possible to play around with the pointers in the method table as well but it takes a fair bit of work. If you want I can try to explain it.