[fpc-pascal]Operator overloading, it works!
Florian Klaempfl
Florian.Klaempfl at gmx.de
Tue Oct 3 13:47:28 CEST 2000
Sebastian Schuberth wrote:
>
> Hi all,
>
> I just realized that it is possible to define operators via overloading
> which accept objects as parameters! You just have to define those
> function outside of the object scope. My mistake was to try to write
> "operator +(a,b:Complex) ...", just like any other object member
> function, within the object definition. Hey, Free Pascal is great :-)
Hmmm, operator overloading works always global so the overloaded
operator can't be defined in a object. Sorry, I misunderstood your
first question.
More information about the fpc-pascal
mailing list