Object type as function result?

Eike Lange eike.lange at uni-essen.de
Tue Dec 16 17:05:41 CET 2003

Hi Folks!

On Die, Dez 16, 2003 at 03:29:54 +0100, Markus Gerwinski wrote:
> when declaring something like
>   type
>     tFoo = object
>       ...
>     end;
>   Function bar ( ... ) = result: tFoo;
> is there a way to suppress this warning:
>   optest.pas:53: warning: object type declared as function result type

There is no such warning if you use "pFoo":

  function bar (x: Integer) = result: pFoo;
    result := new (pFoo, Init)

If that is not what you want, could you give me
some code to play with?



More information about the Gpc mailing list