[fpc-pascal] how to convert this to mode objfpc

misu kun misu.dev at gmail.com
Mon May 11 15:10:40 CEST 2015


Hi
what is the equivalence of this code using mode objfpc ?
btw , it compile fine with {$mode delphi}

type
     obj<T> = object
		x : T;
		class operator add (arg1 ,arg2 : obj<T>):obj<T>; inline;
     end; 		

class operator obj<T>.add (arg1 ,arg2 : obj<T>):obj<T>;
begin
	result.x := arg1.x + arg2.x;
end;



More information about the fpc-pascal mailing list