[fpc-pascal] Re: operator overloading and counting references / creating / destoying anonymous instances

Bernd prof7bit at googlemail.com
Thu Jul 28 16:56:13 CEST 2011

2011/7/28 Bernd <prof7bit at googlemail.com>:
> operator + (a,b: IBigNum):IBigNum;
> begin
>  if not assigned(Result) then
>    Result := TBigNum.Create;
>  BN_add(Result.BN, a.BN, b.BN);
> end;
> Am I allowed to access the Result in this way? I have done only a few
> experiments and at one time it seemed I could indeed access values of
> the fields

This was last night when I was experimenting with records and objects,
I just tried it again with interfaces and there it is always nil.

More information about the fpc-pascal mailing list