Klaas-Jan Stol wrote:

   method __add(left, right)
   {
      b.__add(left, right); //***
}


.sub __add method
   .param pmc self
   .param pmc left
   .param pmc right

The function signatures of your __add methods are bogus.

   Pd = Pl + Pr

is the same as:

  Pd = __add(Pl, Pr)

or

  Pd = Pl.__add(Pr)

The difference between function and method call is just the lookup, if there are multisubs defined. And both of these ought to return a new PMC of the desired type:

  .sub __add method
      .param right
      # add self to right giving d
     .return (d)
  .end

or as function

  .sub __add
     .param left
     .param right
     ...

leo


Reply via email to