Object type as function result?

Markus Gerwinski markus at gerwinski.de
Tue Dec 16 15:29:54 CET 2003


Hi folks,

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

Resp. is there a good reason not to do so? (I've got a case here where it could
indeed yield a more readable statement to return an object instead of a pointer
to the object; but I don't know if it could cause compiler-internal problems.)

Thanks,

  Markus




More information about the Gpc mailing list