[fpc-pascal]Operator overloading for Objects belonging to Classes
Manuel Ritto Correa
mcorrea at civil.ist.utl.pt
Wed Apr 4 17:48:21 CEST 2001
I am interested in using Operator overloading in self defined types. So
I wrote something like:
t:Array[1..3,1..3] of Real;
Operator + (t1,t2:CTensor)tr:CTensor;
tr:=CTensor.Init; //This is never destructed?
For i:=1 to 3 do
For j:=1 to 3 do
in which CTensor is a class.
So in the main program I can write (a,b,c are instances of CTensor
This works ok.
BUT I am worried about constructing
in the operator definition, but never being able to destruct it.
Thanks in advance
Everything should be made as simple as possible, but not
simpler. Albert Einstein
More information about the fpc-pascal