[fpc-pascal] commutative operators

David Emerson dle3ab at angelbase.com
Wed Dec 29 22:01:02 CET 2010


On Wed 29 Dec 2010, Honza wrote:
> 2010/12/29 David Emerson <dle3ab at angelbase.com>:
> > suppose I define an operator:
> >
> > operator + (a: one_type; b: another_type) : one_type;
> >
> > Is there any way to specify that it should be "commutative", so I don't have 
to
> > additionally define the reverse:
> >
> > operator + (a: another_type; b: one_type) : one_type;
> IIRC you don't have to.

well... I do have to. I get "can't determine which overloaded function to call" 
because I have a lot of similar-looking functions and := operators

it's not such a big deal, really.




More information about the fpc-pascal mailing list